@seclai/sdk 1.1.0 → 1.1.2
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 +46 -5
- package/dist/index.cjs +350 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +476 -364
- package/dist/index.d.ts +476 -364
- package/dist/index.js +340 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -360,6 +360,39 @@ interface components {
|
|
|
360
360
|
*/
|
|
361
361
|
total: number;
|
|
362
362
|
};
|
|
363
|
+
/**
|
|
364
|
+
* AiAssistantAcceptResponse
|
|
365
|
+
* @description Response from accepting and executing a plan.
|
|
366
|
+
*/
|
|
367
|
+
AiAssistantAcceptResponse: {
|
|
368
|
+
/**
|
|
369
|
+
* Conversation Id
|
|
370
|
+
* Format: uuid
|
|
371
|
+
* @description Conversation ID.
|
|
372
|
+
*/
|
|
373
|
+
conversation_id: string;
|
|
374
|
+
/**
|
|
375
|
+
* Error
|
|
376
|
+
* @description Error message if failed.
|
|
377
|
+
*/
|
|
378
|
+
error?: string | null;
|
|
379
|
+
/**
|
|
380
|
+
* Executed Actions
|
|
381
|
+
* @description Results of each executed action.
|
|
382
|
+
*/
|
|
383
|
+
executed_actions: components["schemas"]["ExecutedActionResponse"][];
|
|
384
|
+
/**
|
|
385
|
+
* Solution Id
|
|
386
|
+
* @description Solution ID when a new solution was auto-created.
|
|
387
|
+
*/
|
|
388
|
+
solution_id?: string | null;
|
|
389
|
+
/**
|
|
390
|
+
* Success
|
|
391
|
+
* @description Whether execution succeeded.
|
|
392
|
+
* @default true
|
|
393
|
+
*/
|
|
394
|
+
success: boolean;
|
|
395
|
+
};
|
|
363
396
|
/**
|
|
364
397
|
* AiAssistantFeedbackResponse
|
|
365
398
|
* @description Response after submitting feedback.
|
|
@@ -386,6 +419,45 @@ interface components {
|
|
|
386
419
|
*/
|
|
387
420
|
user_input: string;
|
|
388
421
|
};
|
|
422
|
+
/**
|
|
423
|
+
* AiAssistantGenerateResponse
|
|
424
|
+
* @description Response from an AI assistant generate endpoint.
|
|
425
|
+
*/
|
|
426
|
+
AiAssistantGenerateResponse: {
|
|
427
|
+
/**
|
|
428
|
+
* Conversation Id
|
|
429
|
+
* Format: uuid
|
|
430
|
+
* @description Conversation ID for accept/decline.
|
|
431
|
+
*/
|
|
432
|
+
conversation_id: string;
|
|
433
|
+
/**
|
|
434
|
+
* Example Prompts
|
|
435
|
+
* @description Example natural-language prompts that demonstrate the capabilities of this AI assistant.
|
|
436
|
+
*/
|
|
437
|
+
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
438
|
+
/**
|
|
439
|
+
* Note
|
|
440
|
+
* @description AI-generated note about the plan.
|
|
441
|
+
*/
|
|
442
|
+
note: string;
|
|
443
|
+
/**
|
|
444
|
+
* Proposed Actions
|
|
445
|
+
* @description List of proposed actions.
|
|
446
|
+
*/
|
|
447
|
+
proposed_actions: components["schemas"]["ProposedActionResponse"][];
|
|
448
|
+
/**
|
|
449
|
+
* Requires Delete Confirmation
|
|
450
|
+
* @description Whether destructive actions require explicit confirmation.
|
|
451
|
+
* @default false
|
|
452
|
+
*/
|
|
453
|
+
requires_delete_confirmation: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Success
|
|
456
|
+
* @description Whether plan generation succeeded.
|
|
457
|
+
* @default false
|
|
458
|
+
*/
|
|
459
|
+
success: boolean;
|
|
460
|
+
};
|
|
389
461
|
/** AiConversationHistoryResponse */
|
|
390
462
|
AiConversationHistoryResponse: {
|
|
391
463
|
/**
|
|
@@ -439,6 +511,37 @@ interface components {
|
|
|
439
511
|
*/
|
|
440
512
|
user_input: string;
|
|
441
513
|
};
|
|
514
|
+
/**
|
|
515
|
+
* AppliedActionResponse
|
|
516
|
+
* @description Result of a single executed governance action.
|
|
517
|
+
*/
|
|
518
|
+
AppliedActionResponse: {
|
|
519
|
+
/**
|
|
520
|
+
* Action Type
|
|
521
|
+
* @description Type of action that was executed.
|
|
522
|
+
*/
|
|
523
|
+
action_type: string;
|
|
524
|
+
/**
|
|
525
|
+
* Description
|
|
526
|
+
* @description Human-readable description of the executed action.
|
|
527
|
+
*/
|
|
528
|
+
description: string;
|
|
529
|
+
/**
|
|
530
|
+
* Error
|
|
531
|
+
* @description Error message if this action failed, or null.
|
|
532
|
+
*/
|
|
533
|
+
error?: string | null;
|
|
534
|
+
/**
|
|
535
|
+
* Policy Id
|
|
536
|
+
* @description ID of the policy that was created or modified, or null.
|
|
537
|
+
*/
|
|
538
|
+
policy_id?: string | null;
|
|
539
|
+
/**
|
|
540
|
+
* Success
|
|
541
|
+
* @description Whether this individual action succeeded.
|
|
542
|
+
*/
|
|
543
|
+
success: boolean;
|
|
544
|
+
};
|
|
442
545
|
/** Body_upload_file_to_content_api_contents__source_connection_content_version__upload_post */
|
|
443
546
|
Body_upload_file_to_content_api_contents__source_connection_content_version__upload_post: {
|
|
444
547
|
/**
|
|
@@ -1179,6 +1282,43 @@ interface components {
|
|
|
1179
1282
|
ExamplePrompt: {
|
|
1180
1283
|
[key: string]: string;
|
|
1181
1284
|
};
|
|
1285
|
+
/**
|
|
1286
|
+
* ExecutedActionResponse
|
|
1287
|
+
* @description A single executed action result.
|
|
1288
|
+
*/
|
|
1289
|
+
ExecutedActionResponse: {
|
|
1290
|
+
/**
|
|
1291
|
+
* Action Type
|
|
1292
|
+
* @description Type of the executed action.
|
|
1293
|
+
*/
|
|
1294
|
+
action_type: string;
|
|
1295
|
+
/**
|
|
1296
|
+
* Description
|
|
1297
|
+
* @description Human-readable description.
|
|
1298
|
+
*/
|
|
1299
|
+
description: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Error
|
|
1302
|
+
* @description Error message if failed.
|
|
1303
|
+
*/
|
|
1304
|
+
error?: string | null;
|
|
1305
|
+
/**
|
|
1306
|
+
* Resource Id
|
|
1307
|
+
* @description ID of the affected resource.
|
|
1308
|
+
*/
|
|
1309
|
+
resource_id?: string | null;
|
|
1310
|
+
/**
|
|
1311
|
+
* Resource Type
|
|
1312
|
+
* @description Type of the affected resource.
|
|
1313
|
+
*/
|
|
1314
|
+
resource_type?: string | null;
|
|
1315
|
+
/**
|
|
1316
|
+
* Success
|
|
1317
|
+
* @description Whether the action succeeded.
|
|
1318
|
+
* @default true
|
|
1319
|
+
*/
|
|
1320
|
+
success: boolean;
|
|
1321
|
+
};
|
|
1182
1322
|
/**
|
|
1183
1323
|
* ExportFormat
|
|
1184
1324
|
* @description Supported export file formats.
|
|
@@ -1329,6 +1469,68 @@ interface components {
|
|
|
1329
1469
|
*/
|
|
1330
1470
|
success: boolean;
|
|
1331
1471
|
};
|
|
1472
|
+
/**
|
|
1473
|
+
* GovernanceAiAcceptResponse
|
|
1474
|
+
* @description Response from accepting a governance AI assistant plan.
|
|
1475
|
+
*/
|
|
1476
|
+
GovernanceAiAcceptResponse: {
|
|
1477
|
+
/**
|
|
1478
|
+
* Actions Applied
|
|
1479
|
+
* @description Results of each action that was executed.
|
|
1480
|
+
*/
|
|
1481
|
+
actions_applied: components["schemas"]["AppliedActionResponse"][];
|
|
1482
|
+
/**
|
|
1483
|
+
* Conversation Id
|
|
1484
|
+
* @description Conversation ID that was accepted.
|
|
1485
|
+
*/
|
|
1486
|
+
conversation_id: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* Error
|
|
1489
|
+
* @description Overall error message if the plan failed, or null.
|
|
1490
|
+
*/
|
|
1491
|
+
error?: string | null;
|
|
1492
|
+
/**
|
|
1493
|
+
* Success
|
|
1494
|
+
* @description Whether all actions were applied successfully.
|
|
1495
|
+
*/
|
|
1496
|
+
success: boolean;
|
|
1497
|
+
};
|
|
1498
|
+
/**
|
|
1499
|
+
* GovernanceAiAssistantResponse
|
|
1500
|
+
* @description Response from the governance AI assistant generate endpoint.
|
|
1501
|
+
*/
|
|
1502
|
+
GovernanceAiAssistantResponse: {
|
|
1503
|
+
/**
|
|
1504
|
+
* Conversation Id
|
|
1505
|
+
* @description Conversation ID to accept or decline this plan.
|
|
1506
|
+
*/
|
|
1507
|
+
conversation_id: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Example Prompts
|
|
1510
|
+
* @description Example natural-language prompts that demonstrate the capabilities of the governance AI assistant.
|
|
1511
|
+
*/
|
|
1512
|
+
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
1513
|
+
/**
|
|
1514
|
+
* Note
|
|
1515
|
+
* @description AI-generated summary of the proposed changes.
|
|
1516
|
+
*/
|
|
1517
|
+
note: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Prompt Call Id
|
|
1520
|
+
* @description Prompt call ID for credit tracking, or null.
|
|
1521
|
+
*/
|
|
1522
|
+
prompt_call_id?: string | null;
|
|
1523
|
+
/**
|
|
1524
|
+
* Proposed Actions
|
|
1525
|
+
* @description Ordered list of policy actions the AI proposes to execute.
|
|
1526
|
+
*/
|
|
1527
|
+
proposed_actions: components["schemas"]["ProposedPolicyActionResponse"][];
|
|
1528
|
+
/**
|
|
1529
|
+
* Success
|
|
1530
|
+
* @description Whether the plan was generated successfully.
|
|
1531
|
+
*/
|
|
1532
|
+
success: boolean;
|
|
1533
|
+
};
|
|
1332
1534
|
/** HTTPValidationError */
|
|
1333
1535
|
HTTPValidationError: {
|
|
1334
1536
|
/** Detail */
|
|
@@ -1505,6 +1707,91 @@ interface components {
|
|
|
1505
1707
|
*/
|
|
1506
1708
|
accepted: boolean;
|
|
1507
1709
|
};
|
|
1710
|
+
/**
|
|
1711
|
+
* MemoryBankAiAssistantResponse
|
|
1712
|
+
* @description Response from the memory bank AI assistant.
|
|
1713
|
+
*/
|
|
1714
|
+
MemoryBankAiAssistantResponse: {
|
|
1715
|
+
/** @description Proposed configuration, or null. */
|
|
1716
|
+
config?: components["schemas"]["MemoryBankConfigResponse"] | null;
|
|
1717
|
+
/**
|
|
1718
|
+
* Conversation Id
|
|
1719
|
+
* @description Conversation ID for follow-up.
|
|
1720
|
+
*/
|
|
1721
|
+
conversation_id: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* Example Prompts
|
|
1724
|
+
* @description Example natural-language prompts that demonstrate the capabilities of the memory bank AI assistant.
|
|
1725
|
+
*/
|
|
1726
|
+
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
1727
|
+
/**
|
|
1728
|
+
* Note
|
|
1729
|
+
* @description AI-generated explanation.
|
|
1730
|
+
*/
|
|
1731
|
+
note: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Prompt Call Id
|
|
1734
|
+
* @description Prompt call ID for credit tracking.
|
|
1735
|
+
*/
|
|
1736
|
+
prompt_call_id?: string | null;
|
|
1737
|
+
/**
|
|
1738
|
+
* Success
|
|
1739
|
+
* @description Whether generation succeeded.
|
|
1740
|
+
* @default false
|
|
1741
|
+
*/
|
|
1742
|
+
success: boolean;
|
|
1743
|
+
};
|
|
1744
|
+
/**
|
|
1745
|
+
* MemoryBankConfigResponse
|
|
1746
|
+
* @description Suggested memory bank configuration from the AI assistant.
|
|
1747
|
+
*/
|
|
1748
|
+
MemoryBankConfigResponse: {
|
|
1749
|
+
/**
|
|
1750
|
+
* Compaction Prompt
|
|
1751
|
+
* @description Suggested compaction prompt.
|
|
1752
|
+
*/
|
|
1753
|
+
compaction_prompt?: string | null;
|
|
1754
|
+
/**
|
|
1755
|
+
* Description
|
|
1756
|
+
* @description Suggested description.
|
|
1757
|
+
*/
|
|
1758
|
+
description?: string | null;
|
|
1759
|
+
/**
|
|
1760
|
+
* Max Age Days
|
|
1761
|
+
* @description Max age in days.
|
|
1762
|
+
*/
|
|
1763
|
+
max_age_days?: number | null;
|
|
1764
|
+
/**
|
|
1765
|
+
* Max Size Tokens
|
|
1766
|
+
* @description Max size in tokens.
|
|
1767
|
+
*/
|
|
1768
|
+
max_size_tokens?: number | null;
|
|
1769
|
+
/**
|
|
1770
|
+
* Max Turns
|
|
1771
|
+
* @description Max conversation turns.
|
|
1772
|
+
*/
|
|
1773
|
+
max_turns?: number | null;
|
|
1774
|
+
/**
|
|
1775
|
+
* Mode
|
|
1776
|
+
* @description Memory bank mode.
|
|
1777
|
+
*/
|
|
1778
|
+
mode: string;
|
|
1779
|
+
/**
|
|
1780
|
+
* Name
|
|
1781
|
+
* @description Suggested name.
|
|
1782
|
+
*/
|
|
1783
|
+
name: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Retention Days
|
|
1786
|
+
* @description Retention in days.
|
|
1787
|
+
*/
|
|
1788
|
+
retention_days?: number | null;
|
|
1789
|
+
/**
|
|
1790
|
+
* Type
|
|
1791
|
+
* @description Memory bank type: conversation or general.
|
|
1792
|
+
*/
|
|
1793
|
+
type: string;
|
|
1794
|
+
};
|
|
1508
1795
|
/**
|
|
1509
1796
|
* MemoryBankListResponseModel
|
|
1510
1797
|
* @description Paginated list of memory banks.
|
|
@@ -1657,6 +1944,58 @@ interface components {
|
|
|
1657
1944
|
* @enum {string}
|
|
1658
1945
|
*/
|
|
1659
1946
|
PromptModelAutoUpgradeStrategy: "none" | "early_adopter" | "middle_of_road" | "cautious_adopter";
|
|
1947
|
+
/**
|
|
1948
|
+
* ProposedActionResponse
|
|
1949
|
+
* @description A single proposed action.
|
|
1950
|
+
*/
|
|
1951
|
+
ProposedActionResponse: {
|
|
1952
|
+
/**
|
|
1953
|
+
* Action Type
|
|
1954
|
+
* @description Type of the proposed action.
|
|
1955
|
+
*/
|
|
1956
|
+
action_type: string;
|
|
1957
|
+
/**
|
|
1958
|
+
* Description
|
|
1959
|
+
* @description Human-readable description of the action.
|
|
1960
|
+
*/
|
|
1961
|
+
description: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* Is Destructive
|
|
1964
|
+
* @description Whether the action is destructive.
|
|
1965
|
+
* @default false
|
|
1966
|
+
*/
|
|
1967
|
+
is_destructive: boolean;
|
|
1968
|
+
/**
|
|
1969
|
+
* Params
|
|
1970
|
+
* @description Parameters for the action.
|
|
1971
|
+
*/
|
|
1972
|
+
params: {
|
|
1973
|
+
[key: string]: unknown;
|
|
1974
|
+
};
|
|
1975
|
+
};
|
|
1976
|
+
/**
|
|
1977
|
+
* ProposedPolicyActionResponse
|
|
1978
|
+
* @description A single proposed governance policy action.
|
|
1979
|
+
*/
|
|
1980
|
+
ProposedPolicyActionResponse: {
|
|
1981
|
+
/**
|
|
1982
|
+
* Action Type
|
|
1983
|
+
* @description Type of action: create, update, delete, enable, or disable.
|
|
1984
|
+
*/
|
|
1985
|
+
action_type: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* Description
|
|
1988
|
+
* @description Human-readable description of what this action will do.
|
|
1989
|
+
*/
|
|
1990
|
+
description: string;
|
|
1991
|
+
/**
|
|
1992
|
+
* Params
|
|
1993
|
+
* @description Parameters for the action (e.g. policy_document_id, thresholds).
|
|
1994
|
+
*/
|
|
1995
|
+
params: {
|
|
1996
|
+
[key: string]: unknown;
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1660
1999
|
/** SolutionSourceConnectionResponse */
|
|
1661
2000
|
SolutionSourceConnectionResponse: {
|
|
1662
2001
|
/**
|
|
@@ -2723,63 +3062,6 @@ interface components {
|
|
|
2723
3062
|
*/
|
|
2724
3063
|
status: string;
|
|
2725
3064
|
};
|
|
2726
|
-
/**
|
|
2727
|
-
* AppliedActionResponse
|
|
2728
|
-
* @description Result of a single executed governance action.
|
|
2729
|
-
*/
|
|
2730
|
-
routers__api__governance__AppliedActionResponse: {
|
|
2731
|
-
/**
|
|
2732
|
-
* Action Type
|
|
2733
|
-
* @description Type of action that was executed.
|
|
2734
|
-
*/
|
|
2735
|
-
action_type: string;
|
|
2736
|
-
/**
|
|
2737
|
-
* Description
|
|
2738
|
-
* @description Human-readable description of the executed action.
|
|
2739
|
-
*/
|
|
2740
|
-
description: string;
|
|
2741
|
-
/**
|
|
2742
|
-
* Error
|
|
2743
|
-
* @description Error message if this action failed, or null.
|
|
2744
|
-
*/
|
|
2745
|
-
error?: string | null;
|
|
2746
|
-
/**
|
|
2747
|
-
* Policy Id
|
|
2748
|
-
* @description ID of the policy that was created or modified, or null.
|
|
2749
|
-
*/
|
|
2750
|
-
policy_id?: string | null;
|
|
2751
|
-
/**
|
|
2752
|
-
* Success
|
|
2753
|
-
* @description Whether this individual action succeeded.
|
|
2754
|
-
*/
|
|
2755
|
-
success: boolean;
|
|
2756
|
-
};
|
|
2757
|
-
/**
|
|
2758
|
-
* GovernanceAiAcceptResponse
|
|
2759
|
-
* @description Response from accepting a governance AI assistant plan.
|
|
2760
|
-
*/
|
|
2761
|
-
routers__api__governance__GovernanceAiAcceptResponse: {
|
|
2762
|
-
/**
|
|
2763
|
-
* Actions Applied
|
|
2764
|
-
* @description Results of each action that was executed.
|
|
2765
|
-
*/
|
|
2766
|
-
actions_applied: components["schemas"]["routers__api__governance__AppliedActionResponse"][];
|
|
2767
|
-
/**
|
|
2768
|
-
* Conversation Id
|
|
2769
|
-
* @description Conversation ID that was accepted.
|
|
2770
|
-
*/
|
|
2771
|
-
conversation_id: string;
|
|
2772
|
-
/**
|
|
2773
|
-
* Error
|
|
2774
|
-
* @description Overall error message if the plan failed, or null.
|
|
2775
|
-
*/
|
|
2776
|
-
error?: string | null;
|
|
2777
|
-
/**
|
|
2778
|
-
* Success
|
|
2779
|
-
* @description Whether all actions were applied successfully.
|
|
2780
|
-
*/
|
|
2781
|
-
success: boolean;
|
|
2782
|
-
};
|
|
2783
3065
|
/**
|
|
2784
3066
|
* GovernanceAiAssistantRequest
|
|
2785
3067
|
* @description Request body for the governance AI assistant.
|
|
@@ -2791,42 +3073,6 @@ interface components {
|
|
|
2791
3073
|
*/
|
|
2792
3074
|
user_input: string;
|
|
2793
3075
|
};
|
|
2794
|
-
/**
|
|
2795
|
-
* GovernanceAiAssistantResponse
|
|
2796
|
-
* @description Response from the governance AI assistant generate endpoint.
|
|
2797
|
-
*/
|
|
2798
|
-
routers__api__governance__GovernanceAiAssistantResponse: {
|
|
2799
|
-
/**
|
|
2800
|
-
* Conversation Id
|
|
2801
|
-
* @description Conversation ID to accept or decline this plan.
|
|
2802
|
-
*/
|
|
2803
|
-
conversation_id: string;
|
|
2804
|
-
/**
|
|
2805
|
-
* Example Prompts
|
|
2806
|
-
* @description Example natural-language prompts that demonstrate the capabilities of the governance AI assistant.
|
|
2807
|
-
*/
|
|
2808
|
-
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
2809
|
-
/**
|
|
2810
|
-
* Note
|
|
2811
|
-
* @description AI-generated summary of the proposed changes.
|
|
2812
|
-
*/
|
|
2813
|
-
note: string;
|
|
2814
|
-
/**
|
|
2815
|
-
* Prompt Call Id
|
|
2816
|
-
* @description Prompt call ID for credit tracking, or null.
|
|
2817
|
-
*/
|
|
2818
|
-
prompt_call_id?: string | null;
|
|
2819
|
-
/**
|
|
2820
|
-
* Proposed Actions
|
|
2821
|
-
* @description Ordered list of policy actions the AI proposes to execute.
|
|
2822
|
-
*/
|
|
2823
|
-
proposed_actions: components["schemas"]["routers__api__governance__ProposedPolicyActionResponse"][];
|
|
2824
|
-
/**
|
|
2825
|
-
* Success
|
|
2826
|
-
* @description Whether the plan was generated successfully.
|
|
2827
|
-
*/
|
|
2828
|
-
success: boolean;
|
|
2829
|
-
};
|
|
2830
3076
|
/**
|
|
2831
3077
|
* GovernanceConversationResponse
|
|
2832
3078
|
* @description A governance AI assistant conversation entry.
|
|
@@ -2851,42 +3097,19 @@ interface components {
|
|
|
2851
3097
|
* Id
|
|
2852
3098
|
* @description Conversation ID.
|
|
2853
3099
|
*/
|
|
2854
|
-
id: string;
|
|
2855
|
-
/**
|
|
2856
|
-
* Proposed Actions
|
|
2857
|
-
* @description JSON of proposed actions, or null.
|
|
2858
|
-
*/
|
|
2859
|
-
proposed_actions: {
|
|
2860
|
-
[key: string]: unknown;
|
|
2861
|
-
} | null;
|
|
2862
|
-
/**
|
|
2863
|
-
* User Input
|
|
2864
|
-
* @description The original user request.
|
|
2865
|
-
*/
|
|
2866
|
-
user_input: string;
|
|
2867
|
-
};
|
|
2868
|
-
/**
|
|
2869
|
-
* ProposedPolicyActionResponse
|
|
2870
|
-
* @description A single proposed governance policy action.
|
|
2871
|
-
*/
|
|
2872
|
-
routers__api__governance__ProposedPolicyActionResponse: {
|
|
2873
|
-
/**
|
|
2874
|
-
* Action Type
|
|
2875
|
-
* @description Type of action: create, update, delete, enable, or disable.
|
|
2876
|
-
*/
|
|
2877
|
-
action_type: string;
|
|
2878
|
-
/**
|
|
2879
|
-
* Description
|
|
2880
|
-
* @description Human-readable description of what this action will do.
|
|
2881
|
-
*/
|
|
2882
|
-
description: string;
|
|
3100
|
+
id: string;
|
|
2883
3101
|
/**
|
|
2884
|
-
*
|
|
2885
|
-
* @description
|
|
3102
|
+
* Proposed Actions
|
|
3103
|
+
* @description JSON of proposed actions, or null.
|
|
2886
3104
|
*/
|
|
2887
|
-
|
|
3105
|
+
proposed_actions: {
|
|
2888
3106
|
[key: string]: unknown;
|
|
2889
|
-
};
|
|
3107
|
+
} | null;
|
|
3108
|
+
/**
|
|
3109
|
+
* User Input
|
|
3110
|
+
* @description The original user request.
|
|
3111
|
+
*/
|
|
3112
|
+
user_input: string;
|
|
2890
3113
|
};
|
|
2891
3114
|
/**
|
|
2892
3115
|
* MemoryBankAcceptRequest
|
|
@@ -2922,91 +3145,6 @@ interface components {
|
|
|
2922
3145
|
*/
|
|
2923
3146
|
user_input: string;
|
|
2924
3147
|
};
|
|
2925
|
-
/**
|
|
2926
|
-
* MemoryBankAiAssistantResponse
|
|
2927
|
-
* @description Response from the memory bank AI assistant.
|
|
2928
|
-
*/
|
|
2929
|
-
routers__api__memory_banks__MemoryBankAiAssistantResponse: {
|
|
2930
|
-
/** @description Proposed configuration, or null. */
|
|
2931
|
-
config?: components["schemas"]["routers__api__memory_banks__MemoryBankConfigResponse"] | null;
|
|
2932
|
-
/**
|
|
2933
|
-
* Conversation Id
|
|
2934
|
-
* @description Conversation ID for follow-up.
|
|
2935
|
-
*/
|
|
2936
|
-
conversation_id: string;
|
|
2937
|
-
/**
|
|
2938
|
-
* Example Prompts
|
|
2939
|
-
* @description Example natural-language prompts that demonstrate the capabilities of the memory bank AI assistant.
|
|
2940
|
-
*/
|
|
2941
|
-
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
2942
|
-
/**
|
|
2943
|
-
* Note
|
|
2944
|
-
* @description AI-generated explanation.
|
|
2945
|
-
*/
|
|
2946
|
-
note: string;
|
|
2947
|
-
/**
|
|
2948
|
-
* Prompt Call Id
|
|
2949
|
-
* @description Prompt call ID for credit tracking.
|
|
2950
|
-
*/
|
|
2951
|
-
prompt_call_id?: string | null;
|
|
2952
|
-
/**
|
|
2953
|
-
* Success
|
|
2954
|
-
* @description Whether generation succeeded.
|
|
2955
|
-
* @default false
|
|
2956
|
-
*/
|
|
2957
|
-
success: boolean;
|
|
2958
|
-
};
|
|
2959
|
-
/**
|
|
2960
|
-
* MemoryBankConfigResponse
|
|
2961
|
-
* @description Suggested memory bank configuration from the AI assistant.
|
|
2962
|
-
*/
|
|
2963
|
-
routers__api__memory_banks__MemoryBankConfigResponse: {
|
|
2964
|
-
/**
|
|
2965
|
-
* Compaction Prompt
|
|
2966
|
-
* @description Suggested compaction prompt.
|
|
2967
|
-
*/
|
|
2968
|
-
compaction_prompt?: string | null;
|
|
2969
|
-
/**
|
|
2970
|
-
* Description
|
|
2971
|
-
* @description Suggested description.
|
|
2972
|
-
*/
|
|
2973
|
-
description?: string | null;
|
|
2974
|
-
/**
|
|
2975
|
-
* Max Age Days
|
|
2976
|
-
* @description Max age in days.
|
|
2977
|
-
*/
|
|
2978
|
-
max_age_days?: number | null;
|
|
2979
|
-
/**
|
|
2980
|
-
* Max Size Tokens
|
|
2981
|
-
* @description Max size in tokens.
|
|
2982
|
-
*/
|
|
2983
|
-
max_size_tokens?: number | null;
|
|
2984
|
-
/**
|
|
2985
|
-
* Max Turns
|
|
2986
|
-
* @description Max conversation turns.
|
|
2987
|
-
*/
|
|
2988
|
-
max_turns?: number | null;
|
|
2989
|
-
/**
|
|
2990
|
-
* Mode
|
|
2991
|
-
* @description Memory bank mode.
|
|
2992
|
-
*/
|
|
2993
|
-
mode: string;
|
|
2994
|
-
/**
|
|
2995
|
-
* Name
|
|
2996
|
-
* @description Suggested name.
|
|
2997
|
-
*/
|
|
2998
|
-
name: string;
|
|
2999
|
-
/**
|
|
3000
|
-
* Retention Days
|
|
3001
|
-
* @description Retention in days.
|
|
3002
|
-
*/
|
|
3003
|
-
retention_days?: number | null;
|
|
3004
|
-
/**
|
|
3005
|
-
* Type
|
|
3006
|
-
* @description Memory bank type: conversation or general.
|
|
3007
|
-
*/
|
|
3008
|
-
type: string;
|
|
3009
|
-
};
|
|
3010
3148
|
/**
|
|
3011
3149
|
* MemoryBankConversationTurnResponse
|
|
3012
3150
|
* @description A single turn of memory bank AI assistant conversation.
|
|
@@ -3094,144 +3232,6 @@ interface components {
|
|
|
3094
3232
|
*/
|
|
3095
3233
|
solution_name?: string | null;
|
|
3096
3234
|
};
|
|
3097
|
-
/**
|
|
3098
|
-
* AiAssistantAcceptResponse
|
|
3099
|
-
* @description Response from accepting and executing a plan.
|
|
3100
|
-
*/
|
|
3101
|
-
routers__api__solutions__AiAssistantAcceptResponse: {
|
|
3102
|
-
/**
|
|
3103
|
-
* Conversation Id
|
|
3104
|
-
* Format: uuid
|
|
3105
|
-
* @description Conversation ID.
|
|
3106
|
-
*/
|
|
3107
|
-
conversation_id: string;
|
|
3108
|
-
/**
|
|
3109
|
-
* Error
|
|
3110
|
-
* @description Error message if failed.
|
|
3111
|
-
*/
|
|
3112
|
-
error?: string | null;
|
|
3113
|
-
/**
|
|
3114
|
-
* Executed Actions
|
|
3115
|
-
* @description Results of each executed action.
|
|
3116
|
-
*/
|
|
3117
|
-
executed_actions: components["schemas"]["routers__api__solutions__ExecutedActionResponse"][];
|
|
3118
|
-
/**
|
|
3119
|
-
* Solution Id
|
|
3120
|
-
* @description Solution ID when a new solution was auto-created.
|
|
3121
|
-
*/
|
|
3122
|
-
solution_id?: string | null;
|
|
3123
|
-
/**
|
|
3124
|
-
* Success
|
|
3125
|
-
* @description Whether execution succeeded.
|
|
3126
|
-
* @default true
|
|
3127
|
-
*/
|
|
3128
|
-
success: boolean;
|
|
3129
|
-
};
|
|
3130
|
-
/**
|
|
3131
|
-
* AiAssistantGenerateResponse
|
|
3132
|
-
* @description Response from an AI assistant generate endpoint.
|
|
3133
|
-
*/
|
|
3134
|
-
routers__api__solutions__AiAssistantGenerateResponse: {
|
|
3135
|
-
/**
|
|
3136
|
-
* Conversation Id
|
|
3137
|
-
* Format: uuid
|
|
3138
|
-
* @description Conversation ID for accept/decline.
|
|
3139
|
-
*/
|
|
3140
|
-
conversation_id: string;
|
|
3141
|
-
/**
|
|
3142
|
-
* Example Prompts
|
|
3143
|
-
* @description Example natural-language prompts that demonstrate the capabilities of this AI assistant.
|
|
3144
|
-
*/
|
|
3145
|
-
example_prompts?: components["schemas"]["ExamplePrompt"][];
|
|
3146
|
-
/**
|
|
3147
|
-
* Note
|
|
3148
|
-
* @description AI-generated note about the plan.
|
|
3149
|
-
*/
|
|
3150
|
-
note: string;
|
|
3151
|
-
/**
|
|
3152
|
-
* Proposed Actions
|
|
3153
|
-
* @description List of proposed actions.
|
|
3154
|
-
*/
|
|
3155
|
-
proposed_actions: components["schemas"]["routers__api__solutions__ProposedActionResponse"][];
|
|
3156
|
-
/**
|
|
3157
|
-
* Requires Delete Confirmation
|
|
3158
|
-
* @description Whether destructive actions require explicit confirmation.
|
|
3159
|
-
* @default false
|
|
3160
|
-
*/
|
|
3161
|
-
requires_delete_confirmation: boolean;
|
|
3162
|
-
/**
|
|
3163
|
-
* Success
|
|
3164
|
-
* @description Whether plan generation succeeded.
|
|
3165
|
-
* @default false
|
|
3166
|
-
*/
|
|
3167
|
-
success: boolean;
|
|
3168
|
-
};
|
|
3169
|
-
/**
|
|
3170
|
-
* ExecutedActionResponse
|
|
3171
|
-
* @description A single executed action result.
|
|
3172
|
-
*/
|
|
3173
|
-
routers__api__solutions__ExecutedActionResponse: {
|
|
3174
|
-
/**
|
|
3175
|
-
* Action Type
|
|
3176
|
-
* @description Type of the executed action.
|
|
3177
|
-
*/
|
|
3178
|
-
action_type: string;
|
|
3179
|
-
/**
|
|
3180
|
-
* Description
|
|
3181
|
-
* @description Human-readable description.
|
|
3182
|
-
*/
|
|
3183
|
-
description: string;
|
|
3184
|
-
/**
|
|
3185
|
-
* Error
|
|
3186
|
-
* @description Error message if failed.
|
|
3187
|
-
*/
|
|
3188
|
-
error?: string | null;
|
|
3189
|
-
/**
|
|
3190
|
-
* Resource Id
|
|
3191
|
-
* @description ID of the affected resource.
|
|
3192
|
-
*/
|
|
3193
|
-
resource_id?: string | null;
|
|
3194
|
-
/**
|
|
3195
|
-
* Resource Type
|
|
3196
|
-
* @description Type of the affected resource.
|
|
3197
|
-
*/
|
|
3198
|
-
resource_type?: string | null;
|
|
3199
|
-
/**
|
|
3200
|
-
* Success
|
|
3201
|
-
* @description Whether the action succeeded.
|
|
3202
|
-
* @default true
|
|
3203
|
-
*/
|
|
3204
|
-
success: boolean;
|
|
3205
|
-
};
|
|
3206
|
-
/**
|
|
3207
|
-
* ProposedActionResponse
|
|
3208
|
-
* @description A single proposed action.
|
|
3209
|
-
*/
|
|
3210
|
-
routers__api__solutions__ProposedActionResponse: {
|
|
3211
|
-
/**
|
|
3212
|
-
* Action Type
|
|
3213
|
-
* @description Type of the proposed action.
|
|
3214
|
-
*/
|
|
3215
|
-
action_type: string;
|
|
3216
|
-
/**
|
|
3217
|
-
* Description
|
|
3218
|
-
* @description Human-readable description of the action.
|
|
3219
|
-
*/
|
|
3220
|
-
description: string;
|
|
3221
|
-
/**
|
|
3222
|
-
* Is Destructive
|
|
3223
|
-
* @description Whether the action is destructive.
|
|
3224
|
-
* @default false
|
|
3225
|
-
*/
|
|
3226
|
-
is_destructive: boolean;
|
|
3227
|
-
/**
|
|
3228
|
-
* Params
|
|
3229
|
-
* @description Parameters for the action.
|
|
3230
|
-
*/
|
|
3231
|
-
params: {
|
|
3232
|
-
[key: string]: unknown;
|
|
3233
|
-
};
|
|
3234
|
-
};
|
|
3235
3235
|
/** SolutionAgentResponse */
|
|
3236
3236
|
routers__api__solutions__SolutionAgentResponse: {
|
|
3237
3237
|
/**
|
|
@@ -3638,7 +3638,10 @@ interface components {
|
|
|
3638
3638
|
};
|
|
3639
3639
|
};
|
|
3640
3640
|
responses: never;
|
|
3641
|
-
parameters:
|
|
3641
|
+
parameters: {
|
|
3642
|
+
/** @description Target a different organization account. When omitted, the user's default account is used. For API key authentication the key's account is always used; the header is accepted but has no effect. */
|
|
3643
|
+
"X-Account-Id": string;
|
|
3644
|
+
};
|
|
3642
3645
|
requestBodies: never;
|
|
3643
3646
|
headers: never;
|
|
3644
3647
|
pathItems: never;
|
|
@@ -3769,11 +3772,11 @@ type UpdateMemoryBankBody = components["schemas"]["UpdateMemoryBankBody"];
|
|
|
3769
3772
|
/** Memory bank AI assistant request. */
|
|
3770
3773
|
type MemoryBankAiAssistantRequest = components["schemas"]["routers__api__memory_banks__MemoryBankAiAssistantRequest"];
|
|
3771
3774
|
/** Memory bank AI assistant response. */
|
|
3772
|
-
type MemoryBankAiAssistantResponse = components["schemas"]["
|
|
3775
|
+
type MemoryBankAiAssistantResponse = components["schemas"]["MemoryBankAiAssistantResponse"];
|
|
3773
3776
|
/** Memory bank AI accept request. */
|
|
3774
3777
|
type MemoryBankAcceptRequest = components["schemas"]["routers__api__memory_banks__MemoryBankAcceptRequest"];
|
|
3775
3778
|
/** Memory bank configuration generated by AI. */
|
|
3776
|
-
type MemoryBankConfigResponse = components["schemas"]["
|
|
3779
|
+
type MemoryBankConfigResponse = components["schemas"]["MemoryBankConfigResponse"];
|
|
3777
3780
|
/** Last conversation for a memory bank AI assistant. */
|
|
3778
3781
|
type MemoryBankLastConversationResponse = components["schemas"]["routers__api__memory_banks__MemoryBankLastConversationResponse"];
|
|
3779
3782
|
/** Individual turn in a memory bank AI conversation. */
|
|
@@ -3851,15 +3854,15 @@ type MarkConversationTurnRequest = components["schemas"]["MarkConversationTurnRe
|
|
|
3851
3854
|
/** AI assistant generate request for solutions. */
|
|
3852
3855
|
type AiAssistantGenerateRequest = components["schemas"]["AiAssistantGenerateRequest"];
|
|
3853
3856
|
/** AI assistant generate response for solutions. */
|
|
3854
|
-
type AiAssistantGenerateResponse = components["schemas"]["
|
|
3857
|
+
type AiAssistantGenerateResponse = components["schemas"]["AiAssistantGenerateResponse"];
|
|
3855
3858
|
/** AI assistant accept request for solutions. */
|
|
3856
3859
|
type AiAssistantAcceptRequest = components["schemas"]["routers__api__solutions__AiAssistantAcceptRequest"];
|
|
3857
3860
|
/** AI assistant accept response for solutions. */
|
|
3858
|
-
type AiAssistantAcceptResponse = components["schemas"]["
|
|
3861
|
+
type AiAssistantAcceptResponse = components["schemas"]["AiAssistantAcceptResponse"];
|
|
3859
3862
|
/** Proposed action in a solution AI plan. */
|
|
3860
|
-
type ProposedActionResponse = components["schemas"]["
|
|
3863
|
+
type ProposedActionResponse = components["schemas"]["ProposedActionResponse"];
|
|
3861
3864
|
/** Executed action in a solution AI plan. */
|
|
3862
|
-
type ExecutedActionResponse = components["schemas"]["
|
|
3865
|
+
type ExecutedActionResponse = components["schemas"]["ExecutedActionResponse"];
|
|
3863
3866
|
/** Request body for linking resources (agents, KBs, sources) to a parent. */
|
|
3864
3867
|
type LinkResourcesRequest = components["schemas"]["LinkResourcesRequest"];
|
|
3865
3868
|
/** Request body for unlinking resources from a parent. */
|
|
@@ -3867,15 +3870,15 @@ type UnlinkResourcesRequest = components["schemas"]["UnlinkResourcesRequest"];
|
|
|
3867
3870
|
/** Governance AI assistant request. */
|
|
3868
3871
|
type GovernanceAiAssistantRequest = components["schemas"]["routers__api__governance__GovernanceAiAssistantRequest"];
|
|
3869
3872
|
/** Governance AI assistant response. */
|
|
3870
|
-
type GovernanceAiAssistantResponse = components["schemas"]["
|
|
3873
|
+
type GovernanceAiAssistantResponse = components["schemas"]["GovernanceAiAssistantResponse"];
|
|
3871
3874
|
/** Governance AI accept response. */
|
|
3872
|
-
type GovernanceAiAcceptResponse = components["schemas"]["
|
|
3875
|
+
type GovernanceAiAcceptResponse = components["schemas"]["GovernanceAiAcceptResponse"];
|
|
3873
3876
|
/** Governance conversation turn. */
|
|
3874
3877
|
type GovernanceConversationResponse = components["schemas"]["routers__api__governance__GovernanceConversationResponse"];
|
|
3875
3878
|
/** Proposed policy action from governance AI. */
|
|
3876
|
-
type GovernanceProposedPolicyActionResponse = components["schemas"]["
|
|
3879
|
+
type GovernanceProposedPolicyActionResponse = components["schemas"]["ProposedPolicyActionResponse"];
|
|
3877
3880
|
/** Applied policy action from governance AI. */
|
|
3878
|
-
type GovernanceAppliedActionResponse = components["schemas"]["
|
|
3881
|
+
type GovernanceAppliedActionResponse = components["schemas"]["AppliedActionResponse"];
|
|
3879
3882
|
/** Request body for creating an alert config. */
|
|
3880
3883
|
type CreateAlertConfigRequest = components["schemas"]["CreateAlertConfigRequest"];
|
|
3881
3884
|
/** Request body for updating an alert config. */
|
|
@@ -3924,10 +3927,20 @@ interface SortableListOptions extends ListOptions {
|
|
|
3924
3927
|
declare const SECLAI_API_URL = "https://api.seclai.com";
|
|
3925
3928
|
/** A `fetch`-compatible function (e.g. `globalThis.fetch` or `undici.fetch`). */
|
|
3926
3929
|
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
3930
|
+
/**
|
|
3931
|
+
* Token provider: a synchronous or asynchronous function that returns an
|
|
3932
|
+
* access token string. Called on every request to allow automatic refresh.
|
|
3933
|
+
*/
|
|
3934
|
+
type AccessTokenProvider = () => string | Promise<string>;
|
|
3927
3935
|
/** Configuration for the {@link Seclai} client. */
|
|
3928
3936
|
interface SeclaiOptions {
|
|
3929
3937
|
/** API key used for authentication. Defaults to `process.env.SECLAI_API_KEY` when available. */
|
|
3930
3938
|
apiKey?: string;
|
|
3939
|
+
/**
|
|
3940
|
+
* Static bearer access token **or** a provider function that returns one.
|
|
3941
|
+
* Mutually exclusive with `apiKey`.
|
|
3942
|
+
*/
|
|
3943
|
+
accessToken?: string | AccessTokenProvider;
|
|
3931
3944
|
/** API base URL. Defaults to `process.env.SECLAI_API_URL` when available, else {@link SECLAI_API_URL}. */
|
|
3932
3945
|
baseUrl?: string;
|
|
3933
3946
|
/** Header name to use for the API key. Defaults to `x-api-key`. */
|
|
@@ -3936,6 +3949,25 @@ interface SeclaiOptions {
|
|
|
3936
3949
|
defaultHeaders?: Record<string, string>;
|
|
3937
3950
|
/** Optional `fetch` implementation for environments without a global `fetch`. */
|
|
3938
3951
|
fetch?: FetchLike;
|
|
3952
|
+
/**
|
|
3953
|
+
* SSO profile name to load from `~/.seclai/config`.
|
|
3954
|
+
* Defaults to `process.env.SECLAI_PROFILE`, then `"default"`.
|
|
3955
|
+
*/
|
|
3956
|
+
profile?: string;
|
|
3957
|
+
/**
|
|
3958
|
+
* Override the config directory path (default: `SECLAI_CONFIG_DIR` env var or `~/.seclai/`).
|
|
3959
|
+
*/
|
|
3960
|
+
configDir?: string;
|
|
3961
|
+
/**
|
|
3962
|
+
* Whether to auto-refresh expired SSO tokens. Defaults to `true`.
|
|
3963
|
+
* Set to `false` in environments that should not write to disk.
|
|
3964
|
+
*/
|
|
3965
|
+
autoRefresh?: boolean;
|
|
3966
|
+
/**
|
|
3967
|
+
* Target organization account ID. Sent as `X-Account-Id` header.
|
|
3968
|
+
* Overrides the profile's `sso_account_id` when using SSO auth.
|
|
3969
|
+
*/
|
|
3970
|
+
accountId?: string;
|
|
3939
3971
|
}
|
|
3940
3972
|
/**
|
|
3941
3973
|
* Seclai JavaScript/TypeScript client.
|
|
@@ -3962,19 +3994,30 @@ interface SeclaiOptions {
|
|
|
3962
3994
|
* ```
|
|
3963
3995
|
*/
|
|
3964
3996
|
declare class Seclai {
|
|
3965
|
-
private readonly apiKey;
|
|
3966
3997
|
private readonly baseUrl;
|
|
3967
|
-
private readonly apiKeyHeader;
|
|
3968
3998
|
private readonly defaultHeaders;
|
|
3969
3999
|
private readonly fetcher;
|
|
4000
|
+
private _authState;
|
|
4001
|
+
private _authInitPromise;
|
|
4002
|
+
private _authInitError;
|
|
3970
4003
|
/**
|
|
3971
4004
|
* Create a new Seclai client.
|
|
3972
4005
|
*
|
|
4006
|
+
* Credentials are resolved via a chain (first match wins):
|
|
4007
|
+
* 1. Explicit `apiKey` option
|
|
4008
|
+
* 2. Explicit `accessToken` option (static string or provider function)
|
|
4009
|
+
* 3. `SECLAI_API_KEY` environment variable
|
|
4010
|
+
* 4. SSO profile from `~/.seclai/config` + cached tokens in `~/.seclai/sso/cache/`
|
|
4011
|
+
*
|
|
3973
4012
|
* @param opts - Client configuration.
|
|
3974
|
-
* @throws {@link SeclaiConfigurationError} If no API key is provided (and `SECLAI_API_KEY` is not set).
|
|
3975
4013
|
* @throws {@link SeclaiConfigurationError} If no `fetch` implementation is available.
|
|
4014
|
+
* @throws {@link SeclaiConfigurationError} If both `apiKey` and `accessToken` are provided.
|
|
3976
4015
|
*/
|
|
3977
4016
|
constructor(opts?: SeclaiOptions);
|
|
4017
|
+
/** Ensure the credential chain has been resolved. */
|
|
4018
|
+
private ensureAuth;
|
|
4019
|
+
/** Resolve auth headers for the current request. */
|
|
4020
|
+
private authHeaders;
|
|
3978
4021
|
/**
|
|
3979
4022
|
* Make a raw HTTP request to the Seclai API.
|
|
3980
4023
|
*
|
|
@@ -4000,6 +4043,8 @@ declare class Seclai {
|
|
|
4000
4043
|
* @param path - Request path relative to `baseUrl`.
|
|
4001
4044
|
* @param opts - Query params, JSON body, per-request headers, and optional AbortSignal.
|
|
4002
4045
|
* @returns The raw `Response` object.
|
|
4046
|
+
* @throws {SeclaiAPIValidationError} On HTTP 422 responses.
|
|
4047
|
+
* @throws {SeclaiAPIStatusError} On other non-2xx responses.
|
|
4003
4048
|
*/
|
|
4004
4049
|
requestRaw(method: string, path: string, opts?: {
|
|
4005
4050
|
query?: Record<string, unknown>;
|
|
@@ -5031,6 +5076,73 @@ declare class Seclai {
|
|
|
5031
5076
|
}): AsyncGenerator<T, void, undefined>;
|
|
5032
5077
|
}
|
|
5033
5078
|
|
|
5079
|
+
/**
|
|
5080
|
+
* @module
|
|
5081
|
+
*
|
|
5082
|
+
* SSO credential resolution: config file parsing, token caching, and automatic
|
|
5083
|
+
* token refresh against AWS Cognito.
|
|
5084
|
+
*
|
|
5085
|
+
* @internal — not part of the public API surface. Consumed by {@link Seclai}.
|
|
5086
|
+
*/
|
|
5087
|
+
|
|
5088
|
+
/** Resolved SSO profile settings. */
|
|
5089
|
+
interface SsoProfile {
|
|
5090
|
+
ssoAccountId: string;
|
|
5091
|
+
ssoRegion: string;
|
|
5092
|
+
ssoClientId: string;
|
|
5093
|
+
ssoDomain: string;
|
|
5094
|
+
}
|
|
5095
|
+
/** Contents of a single SSO cache file. */
|
|
5096
|
+
interface SsoCacheEntry {
|
|
5097
|
+
accessToken: string;
|
|
5098
|
+
refreshToken?: string;
|
|
5099
|
+
idToken?: string | undefined;
|
|
5100
|
+
expiresAt: string;
|
|
5101
|
+
clientId: string;
|
|
5102
|
+
region: string;
|
|
5103
|
+
cognitoDomain: string;
|
|
5104
|
+
}
|
|
5105
|
+
/** Options for resolving the credential chain. */
|
|
5106
|
+
interface CredentialChainOptions {
|
|
5107
|
+
/** Explicit API key (highest priority). */
|
|
5108
|
+
apiKey?: string | undefined;
|
|
5109
|
+
/** Explicit static bearer token. */
|
|
5110
|
+
accessToken?: string | undefined;
|
|
5111
|
+
/** Dynamic bearer token provider. */
|
|
5112
|
+
accessTokenProvider?: (() => string | Promise<string>) | undefined;
|
|
5113
|
+
/** Name of the profile from ~/.seclai/config. */
|
|
5114
|
+
profile?: string | undefined;
|
|
5115
|
+
/** Override config directory path. */
|
|
5116
|
+
configDir?: string | undefined;
|
|
5117
|
+
/** Whether to auto-refresh expired SSO tokens. Defaults to true. */
|
|
5118
|
+
autoRefresh?: boolean | undefined;
|
|
5119
|
+
/** Account ID override (takes precedence over profile's sso_account_id). */
|
|
5120
|
+
accountId?: string | undefined;
|
|
5121
|
+
/** Header name for API key auth. */
|
|
5122
|
+
apiKeyHeader?: string | undefined;
|
|
5123
|
+
/** fetch implementation for token refresh. */
|
|
5124
|
+
fetch?: FetchLike | undefined;
|
|
5125
|
+
}
|
|
5126
|
+
/**
|
|
5127
|
+
* Resolved authentication state used throughout the client lifecycle.
|
|
5128
|
+
* Created once by {@link resolveCredentialChain} and passed to
|
|
5129
|
+
* {@link resolveAuthHeaders} on every request.
|
|
5130
|
+
*/
|
|
5131
|
+
interface AuthState {
|
|
5132
|
+
mode: "apiKey" | "bearerStatic" | "bearerProvider" | "sso";
|
|
5133
|
+
apiKey?: string;
|
|
5134
|
+
apiKeyHeader: string;
|
|
5135
|
+
accessToken?: string;
|
|
5136
|
+
accessTokenProvider?: () => string | Promise<string>;
|
|
5137
|
+
accountId?: string | undefined;
|
|
5138
|
+
ssoProfile?: SsoProfile;
|
|
5139
|
+
configDir?: string;
|
|
5140
|
+
autoRefresh: boolean;
|
|
5141
|
+
fetcher?: FetchLike | undefined;
|
|
5142
|
+
/** @internal Coalesces concurrent SSO token refresh attempts. */
|
|
5143
|
+
_refreshPromise?: Promise<string> | undefined;
|
|
5144
|
+
}
|
|
5145
|
+
|
|
5034
5146
|
/**
|
|
5035
5147
|
* @module
|
|
5036
5148
|
*
|
|
@@ -5095,4 +5207,4 @@ declare class SeclaiStreamingError extends SeclaiError {
|
|
|
5095
5207
|
constructor(message: string, runId?: string);
|
|
5096
5208
|
}
|
|
5097
5209
|
|
|
5098
|
-
export { type AddCommentRequest, type AddConversationTurnRequest, type AgentDefinitionResponse, type AgentEvaluationTier, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type ChangeStatusRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExportFormat, type ExportListResponse, type ExportResponse, type FetchLike, type FileUploadResponse, type GenerateAgentStepsRequest, type GenerateAgentStepsResponse, type GenerateStepConfigRequest, type GenerateStepConfigResponse, type GovernanceAiAcceptResponse, type GovernanceAiAssistantRequest, type GovernanceAiAssistantResponse, type GovernanceAppliedActionResponse, type GovernanceConversationResponse, type GovernanceProposedPolicyActionResponse, type HTTPValidationError, type InlineTextReplaceRequest, type InlineTextUploadRequest, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PromptModelAutoUpgradeStrategy, type ProposedActionResponse, SECLAI_API_URL, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceEmbeddingMigrationResponse, type SourceListResponse, type SourceResponse, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UpdateAgentDefinitionRequest, type UpdateAgentRequest, type UpdateAlertConfigRequest, type UpdateEvaluationCriteriaRequest, type UpdateKnowledgeBaseBody, type UpdateMemoryBankBody, type UpdateOrganizationAlertPreferenceRequest, type UpdateSolutionRequest, type UpdateSourceBody, type UploadAgentInputApiResponse, type ValidationError };
|
|
5210
|
+
export { type AccessTokenProvider, type AddCommentRequest, type AddConversationTurnRequest, type AgentDefinitionResponse, type AgentEvaluationTier, type AgentListResponse, type AgentRunAttemptResponse, type AgentRunEvent, type AgentRunListResponse, type AgentRunRequest, type AgentRunResponse, type AgentRunStepResponse, type AgentRunStreamRequest, type AgentSummaryResponse, type AgentTraceMatchResponse, type AgentTraceSearchRequest, type AgentTraceSearchResponse, type AiAssistantAcceptRequest, type AiAssistantAcceptResponse, type AiAssistantFeedbackRequest, type AiAssistantFeedbackResponse, type AiAssistantGenerateRequest, type AiAssistantGenerateResponse, type AiConversationHistoryResponse, type AiConversationTurnResponse, type AuthState, type ChangeStatusRequest, type CompactionEvaluationModel, type CompactionTestResponse, type CompatibleRunListResponse, type CompatibleRunResponse, type ContentDetailResponse, type ContentEmbeddingResponse, type ContentEmbeddingsListResponse, type ContentFileUploadResponse, type CreateAgentRequest, type CreateAlertConfigRequest, type CreateEvaluationCriteriaRequest, type CreateEvaluationResultRequest, type CreateExportRequest, type CreateKnowledgeBaseBody, type CreateMemoryBankBody, type CreateSolutionRequest, type CreateSourceBody, type CredentialChainOptions, type EstimateExportRequest, type EstimateExportResponse, type EvaluationCriteriaResponse, type EvaluationResultListResponse, type EvaluationResultResponse, type EvaluationResultSummaryResponse, type EvaluationResultWithCriteriaListResponse, type EvaluationResultWithCriteriaResponse, type EvaluationRunSummaryListResponse, type EvaluationRunSummaryResponse, type EvaluationStatus, type ExamplePrompt, type ExecutedActionResponse, type ExportFormat, type ExportListResponse, type ExportResponse, type FetchLike, type FileUploadResponse, type GenerateAgentStepsRequest, type GenerateAgentStepsResponse, type GenerateStepConfigRequest, type GenerateStepConfigResponse, type GovernanceAiAcceptResponse, type GovernanceAiAssistantRequest, type GovernanceAiAssistantResponse, type GovernanceAppliedActionResponse, type GovernanceConversationResponse, type GovernanceProposedPolicyActionResponse, type HTTPValidationError, type InlineTextReplaceRequest, type InlineTextUploadRequest, type JSONValue, type KnowledgeBaseListResponse, type KnowledgeBaseResponse, type LinkResourcesRequest, type ListOptions, type MarkAiSuggestionRequest, type MarkConversationTurnRequest, type MemoryBankAcceptRequest, type MemoryBankAiAssistantRequest, type MemoryBankAiAssistantResponse, type MemoryBankConfigResponse, type MemoryBankConversationTurnResponse, type MemoryBankLastConversationResponse, type MemoryBankListResponse, type MemoryBankResponse, type NonManualEvaluationModeStatResponse, type NonManualEvaluationSummaryResponse, type OrganizationAlertPreferenceListResponse, type OrganizationAlertPreferenceResponse, type PaginationResponse, type PendingProcessingCompletedFailedStatus, type PromptModelAutoUpgradeStrategy, type ProposedActionResponse, SECLAI_API_URL, Seclai, SeclaiAPIStatusError, SeclaiAPIValidationError, SeclaiConfigurationError, SeclaiError, type SeclaiOptions, SeclaiStreamingError, type SolutionAgentResponse, type SolutionConversationResponse, type SolutionKnowledgeBaseResponse, type SolutionListResponse, type SolutionResponse, type SolutionSourceConnectionResponse, type SolutionSummaryResponse, type SortableListOptions, type SourceConnectionResponse, type SourceEmbeddingMigrationResponse, type SourceListResponse, type SourceResponse, type SsoCacheEntry, type SsoProfile, type StandaloneTestCompactionRequest, type StartSourceEmbeddingMigrationRequest, type TestCompactionRequest, type TestDraftEvaluationRequest, type TestDraftEvaluationResponse, type UnlinkResourcesRequest, type UpdateAgentDefinitionRequest, type UpdateAgentRequest, type UpdateAlertConfigRequest, type UpdateEvaluationCriteriaRequest, type UpdateKnowledgeBaseBody, type UpdateMemoryBankBody, type UpdateOrganizationAlertPreferenceRequest, type UpdateSolutionRequest, type UpdateSourceBody, type UploadAgentInputApiResponse, type ValidationError };
|