@genesislcap/foundation-ai 15.19.6 → 15.20.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/dist/dts/index.d.ts +2 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/transports/context-overflow-error.d.ts +86 -0
- package/dist/dts/transports/context-overflow-error.d.ts.map +1 -0
- package/dist/dts/transports/post-with-retry.d.ts.map +1 -1
- package/dist/dts/types/chat.types.d.ts +86 -2
- package/dist/dts/types/chat.types.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/transports/context-overflow-error.js +161 -0
- package/dist/esm/transports/post-with-retry.js +20 -4
- package/dist/foundation-ai.api.json +520 -2
- package/dist/foundation-ai.d.ts +147 -2
- package/package.json +10 -10
|
@@ -3607,6 +3607,34 @@
|
|
|
3607
3607
|
"endIndex": 2
|
|
3608
3608
|
}
|
|
3609
3609
|
},
|
|
3610
|
+
{
|
|
3611
|
+
"kind": "PropertySignature",
|
|
3612
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatConfig#context:member",
|
|
3613
|
+
"docComment": "/**\n * Context-window headroom and the compaction gate.\n */\n",
|
|
3614
|
+
"excerptTokens": [
|
|
3615
|
+
{
|
|
3616
|
+
"kind": "Content",
|
|
3617
|
+
"text": "context?: "
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
"kind": "Reference",
|
|
3621
|
+
"text": "ChatContextConfig",
|
|
3622
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig:interface"
|
|
3623
|
+
},
|
|
3624
|
+
{
|
|
3625
|
+
"kind": "Content",
|
|
3626
|
+
"text": ";"
|
|
3627
|
+
}
|
|
3628
|
+
],
|
|
3629
|
+
"isReadonly": false,
|
|
3630
|
+
"isOptional": true,
|
|
3631
|
+
"releaseTag": "Beta",
|
|
3632
|
+
"name": "context",
|
|
3633
|
+
"propertyTypeTokenRange": {
|
|
3634
|
+
"startIndex": 1,
|
|
3635
|
+
"endIndex": 2
|
|
3636
|
+
}
|
|
3637
|
+
},
|
|
3610
3638
|
{
|
|
3611
3639
|
"kind": "PropertySignature",
|
|
3612
3640
|
"canonicalReference": "@genesislcap/foundation-ai!ChatConfig#costHistory:member",
|
|
@@ -3722,6 +3750,159 @@
|
|
|
3722
3750
|
],
|
|
3723
3751
|
"extendsTokenRanges": []
|
|
3724
3752
|
},
|
|
3753
|
+
{
|
|
3754
|
+
"kind": "Interface",
|
|
3755
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig:interface",
|
|
3756
|
+
"docComment": "/**\n * Context-window management for the chat assistant (GENC-1567).\n *\n * The assistant reserves headroom rather than letting the conversation run to the edge of the model's window and compacting automatically at the last moment. The reason is that a turn is not atomic in cost: a send allowed just under a threshold can run a long tool loop and add a large amount on its own, so a threshold set as a fraction of the window bounds only the size at the START of a turn. What has to be bounded is the growth of one whole turn — and that is a number of tokens, not a percentage.\n *\n * It is also why compaction here is user-initiated rather than automatic: machine state for a stateful flow lives outside the transcript, so rewriting the transcript underneath a mid-flow agent is a judgement the user should make, at a moment of their choosing, rather than something that happens to them mid-journey.\n *\n * @beta\n */\n",
|
|
3757
|
+
"excerptTokens": [
|
|
3758
|
+
{
|
|
3759
|
+
"kind": "Content",
|
|
3760
|
+
"text": "export interface ChatContextConfig "
|
|
3761
|
+
}
|
|
3762
|
+
],
|
|
3763
|
+
"fileUrlPath": "src/types/chat.types.ts",
|
|
3764
|
+
"releaseTag": "Beta",
|
|
3765
|
+
"name": "ChatContextConfig",
|
|
3766
|
+
"preserveMemberOrder": false,
|
|
3767
|
+
"members": [
|
|
3768
|
+
{
|
|
3769
|
+
"kind": "PropertySignature",
|
|
3770
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig#enabled:member",
|
|
3771
|
+
"docComment": "/**\n * Whether the context gate is active at all. - `true` or `undefined` (default) — warn, then block, as the window fills - `false` — no warning and no block; the context indicator still shows\n *\n * An escape hatch for a host that would rather take the provider error than ever have its composer disabled.\n */\n",
|
|
3772
|
+
"excerptTokens": [
|
|
3773
|
+
{
|
|
3774
|
+
"kind": "Content",
|
|
3775
|
+
"text": "enabled?: "
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
"kind": "Content",
|
|
3779
|
+
"text": "boolean"
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"kind": "Content",
|
|
3783
|
+
"text": ";"
|
|
3784
|
+
}
|
|
3785
|
+
],
|
|
3786
|
+
"isReadonly": false,
|
|
3787
|
+
"isOptional": true,
|
|
3788
|
+
"releaseTag": "Beta",
|
|
3789
|
+
"name": "enabled",
|
|
3790
|
+
"propertyTypeTokenRange": {
|
|
3791
|
+
"startIndex": 1,
|
|
3792
|
+
"endIndex": 2
|
|
3793
|
+
}
|
|
3794
|
+
},
|
|
3795
|
+
{
|
|
3796
|
+
"kind": "PropertySignature",
|
|
3797
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig#fallbackContextLimit:member",
|
|
3798
|
+
"docComment": "/**\n * Context window to assume when the active provider reports none.\n *\n * Without a limit there is no percentage and so no gate, which is the right default — guessing a window and blocking against the guess would be worse than not blocking. Set this when you know the window but your provider does not report it.\n */\n",
|
|
3799
|
+
"excerptTokens": [
|
|
3800
|
+
{
|
|
3801
|
+
"kind": "Content",
|
|
3802
|
+
"text": "fallbackContextLimit?: "
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
"kind": "Content",
|
|
3806
|
+
"text": "number"
|
|
3807
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
"kind": "Content",
|
|
3810
|
+
"text": ";"
|
|
3811
|
+
}
|
|
3812
|
+
],
|
|
3813
|
+
"isReadonly": false,
|
|
3814
|
+
"isOptional": true,
|
|
3815
|
+
"releaseTag": "Beta",
|
|
3816
|
+
"name": "fallbackContextLimit",
|
|
3817
|
+
"propertyTypeTokenRange": {
|
|
3818
|
+
"startIndex": 1,
|
|
3819
|
+
"endIndex": 2
|
|
3820
|
+
}
|
|
3821
|
+
},
|
|
3822
|
+
{
|
|
3823
|
+
"kind": "PropertySignature",
|
|
3824
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig#minReclaimTokens:member",
|
|
3825
|
+
"docComment": "/**\n * Smallest reclaim, in tokens, for compaction to be worth running and to be offered as the way past a block.\n *\n * A compaction spends a summarizer call on most of the conversation, so a plan that frees less than this costs more than it buys — and, when the composer is blocked, would be an escape that does not actually clear the block. Default: `5000`.\n */\n",
|
|
3826
|
+
"excerptTokens": [
|
|
3827
|
+
{
|
|
3828
|
+
"kind": "Content",
|
|
3829
|
+
"text": "minReclaimTokens?: "
|
|
3830
|
+
},
|
|
3831
|
+
{
|
|
3832
|
+
"kind": "Content",
|
|
3833
|
+
"text": "number"
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"kind": "Content",
|
|
3837
|
+
"text": ";"
|
|
3838
|
+
}
|
|
3839
|
+
],
|
|
3840
|
+
"isReadonly": false,
|
|
3841
|
+
"isOptional": true,
|
|
3842
|
+
"releaseTag": "Beta",
|
|
3843
|
+
"name": "minReclaimTokens",
|
|
3844
|
+
"propertyTypeTokenRange": {
|
|
3845
|
+
"startIndex": 1,
|
|
3846
|
+
"endIndex": 2
|
|
3847
|
+
}
|
|
3848
|
+
},
|
|
3849
|
+
{
|
|
3850
|
+
"kind": "PropertySignature",
|
|
3851
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig#reserveTokens:member",
|
|
3852
|
+
"docComment": "/**\n * Tokens kept free for a single turn to complete in. The assistant blocks new sends once the conversation would leave less than this much headroom.\n *\n * Deliberately a token count and not a percentage of the window: the reserve needs to cover the worst-case growth of one agentic turn, which does not scale with the model's context size. A percentage gives a 1M-token model a reserve far larger than any turn needs while potentially starving a 200k-token one. Default: `25000`.\n */\n",
|
|
3853
|
+
"excerptTokens": [
|
|
3854
|
+
{
|
|
3855
|
+
"kind": "Content",
|
|
3856
|
+
"text": "reserveTokens?: "
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
"kind": "Content",
|
|
3860
|
+
"text": "number"
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
"kind": "Content",
|
|
3864
|
+
"text": ";"
|
|
3865
|
+
}
|
|
3866
|
+
],
|
|
3867
|
+
"isReadonly": false,
|
|
3868
|
+
"isOptional": true,
|
|
3869
|
+
"releaseTag": "Beta",
|
|
3870
|
+
"name": "reserveTokens",
|
|
3871
|
+
"propertyTypeTokenRange": {
|
|
3872
|
+
"startIndex": 1,
|
|
3873
|
+
"endIndex": 2
|
|
3874
|
+
}
|
|
3875
|
+
},
|
|
3876
|
+
{
|
|
3877
|
+
"kind": "PropertySignature",
|
|
3878
|
+
"canonicalReference": "@genesislcap/foundation-ai!ChatContextConfig#warnMultiplier:member",
|
|
3879
|
+
"docComment": "/**\n * How many reserves ahead of the block the warning appears, as a multiple of {@link ChatContextConfig.reserveTokens}. At the default `2` the warning arrives one full reserve before the block, leaving room to compact at a convenient moment rather than at the wall. Default: `2`.\n */\n",
|
|
3880
|
+
"excerptTokens": [
|
|
3881
|
+
{
|
|
3882
|
+
"kind": "Content",
|
|
3883
|
+
"text": "warnMultiplier?: "
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
"kind": "Content",
|
|
3887
|
+
"text": "number"
|
|
3888
|
+
},
|
|
3889
|
+
{
|
|
3890
|
+
"kind": "Content",
|
|
3891
|
+
"text": ";"
|
|
3892
|
+
}
|
|
3893
|
+
],
|
|
3894
|
+
"isReadonly": false,
|
|
3895
|
+
"isOptional": true,
|
|
3896
|
+
"releaseTag": "Beta",
|
|
3897
|
+
"name": "warnMultiplier",
|
|
3898
|
+
"propertyTypeTokenRange": {
|
|
3899
|
+
"startIndex": 1,
|
|
3900
|
+
"endIndex": 2
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
],
|
|
3904
|
+
"extendsTokenRanges": []
|
|
3905
|
+
},
|
|
3725
3906
|
{
|
|
3726
3907
|
"kind": "Interface",
|
|
3727
3908
|
"canonicalReference": "@genesislcap/foundation-ai!ChatCostHistoryConfig:interface",
|
|
@@ -7325,6 +7506,320 @@
|
|
|
7325
7506
|
"endIndex": 2
|
|
7326
7507
|
}
|
|
7327
7508
|
},
|
|
7509
|
+
{
|
|
7510
|
+
"kind": "Class",
|
|
7511
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError:class",
|
|
7512
|
+
"docComment": "/**\n * Thrown when the provider rejects a request because the prompt exceeds the model's context window.\n *\n * Terminal for the attempt in the same sense as its siblings — retrying the same request cannot clear it — but unlike them it is terminal only until the user acts. Compaction genuinely resolves it, which is why the copy says so.\n *\n * @beta\n */\n",
|
|
7513
|
+
"excerptTokens": [
|
|
7514
|
+
{
|
|
7515
|
+
"kind": "Content",
|
|
7516
|
+
"text": "export declare class ContextOverflowError extends "
|
|
7517
|
+
},
|
|
7518
|
+
{
|
|
7519
|
+
"kind": "Reference",
|
|
7520
|
+
"text": "Error",
|
|
7521
|
+
"canonicalReference": "!Error:interface"
|
|
7522
|
+
},
|
|
7523
|
+
{
|
|
7524
|
+
"kind": "Content",
|
|
7525
|
+
"text": " "
|
|
7526
|
+
}
|
|
7527
|
+
],
|
|
7528
|
+
"fileUrlPath": "src/transports/context-overflow-error.ts",
|
|
7529
|
+
"releaseTag": "Beta",
|
|
7530
|
+
"isAbstract": false,
|
|
7531
|
+
"name": "ContextOverflowError",
|
|
7532
|
+
"preserveMemberOrder": false,
|
|
7533
|
+
"members": [
|
|
7534
|
+
{
|
|
7535
|
+
"kind": "Constructor",
|
|
7536
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError:constructor(1)",
|
|
7537
|
+
"docComment": "/**\n * Constructs a new instance of the `ContextOverflowError` class\n */\n",
|
|
7538
|
+
"excerptTokens": [
|
|
7539
|
+
{
|
|
7540
|
+
"kind": "Content",
|
|
7541
|
+
"text": "constructor(\n vendorLabel: "
|
|
7542
|
+
},
|
|
7543
|
+
{
|
|
7544
|
+
"kind": "Content",
|
|
7545
|
+
"text": "string"
|
|
7546
|
+
},
|
|
7547
|
+
{
|
|
7548
|
+
"kind": "Content",
|
|
7549
|
+
"text": ", \n promptTokens?: "
|
|
7550
|
+
},
|
|
7551
|
+
{
|
|
7552
|
+
"kind": "Content",
|
|
7553
|
+
"text": "number"
|
|
7554
|
+
},
|
|
7555
|
+
{
|
|
7556
|
+
"kind": "Content",
|
|
7557
|
+
"text": ", \n limitTokens?: "
|
|
7558
|
+
},
|
|
7559
|
+
{
|
|
7560
|
+
"kind": "Content",
|
|
7561
|
+
"text": "number"
|
|
7562
|
+
},
|
|
7563
|
+
{
|
|
7564
|
+
"kind": "Content",
|
|
7565
|
+
"text": ", \n detail?: "
|
|
7566
|
+
},
|
|
7567
|
+
{
|
|
7568
|
+
"kind": "Content",
|
|
7569
|
+
"text": "string"
|
|
7570
|
+
},
|
|
7571
|
+
{
|
|
7572
|
+
"kind": "Content",
|
|
7573
|
+
"text": ");"
|
|
7574
|
+
}
|
|
7575
|
+
],
|
|
7576
|
+
"releaseTag": "Beta",
|
|
7577
|
+
"isProtected": false,
|
|
7578
|
+
"overloadIndex": 1,
|
|
7579
|
+
"parameters": [
|
|
7580
|
+
{
|
|
7581
|
+
"parameterName": "vendorLabel",
|
|
7582
|
+
"parameterTypeTokenRange": {
|
|
7583
|
+
"startIndex": 1,
|
|
7584
|
+
"endIndex": 2
|
|
7585
|
+
},
|
|
7586
|
+
"isOptional": false
|
|
7587
|
+
},
|
|
7588
|
+
{
|
|
7589
|
+
"parameterName": "promptTokens",
|
|
7590
|
+
"parameterTypeTokenRange": {
|
|
7591
|
+
"startIndex": 3,
|
|
7592
|
+
"endIndex": 4
|
|
7593
|
+
},
|
|
7594
|
+
"isOptional": true
|
|
7595
|
+
},
|
|
7596
|
+
{
|
|
7597
|
+
"parameterName": "limitTokens",
|
|
7598
|
+
"parameterTypeTokenRange": {
|
|
7599
|
+
"startIndex": 5,
|
|
7600
|
+
"endIndex": 6
|
|
7601
|
+
},
|
|
7602
|
+
"isOptional": true
|
|
7603
|
+
},
|
|
7604
|
+
{
|
|
7605
|
+
"parameterName": "detail",
|
|
7606
|
+
"parameterTypeTokenRange": {
|
|
7607
|
+
"startIndex": 7,
|
|
7608
|
+
"endIndex": 8
|
|
7609
|
+
},
|
|
7610
|
+
"isOptional": true
|
|
7611
|
+
}
|
|
7612
|
+
]
|
|
7613
|
+
},
|
|
7614
|
+
{
|
|
7615
|
+
"kind": "Property",
|
|
7616
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError#detail:member",
|
|
7617
|
+
"docComment": "/**\n * The provider's human-readable message, verbatim, for the log. Never shown to the user.\n */\n",
|
|
7618
|
+
"excerptTokens": [
|
|
7619
|
+
{
|
|
7620
|
+
"kind": "Content",
|
|
7621
|
+
"text": "readonly detail?: "
|
|
7622
|
+
},
|
|
7623
|
+
{
|
|
7624
|
+
"kind": "Content",
|
|
7625
|
+
"text": "string"
|
|
7626
|
+
},
|
|
7627
|
+
{
|
|
7628
|
+
"kind": "Content",
|
|
7629
|
+
"text": ";"
|
|
7630
|
+
}
|
|
7631
|
+
],
|
|
7632
|
+
"isReadonly": true,
|
|
7633
|
+
"isOptional": true,
|
|
7634
|
+
"releaseTag": "Beta",
|
|
7635
|
+
"name": "detail",
|
|
7636
|
+
"propertyTypeTokenRange": {
|
|
7637
|
+
"startIndex": 1,
|
|
7638
|
+
"endIndex": 2
|
|
7639
|
+
},
|
|
7640
|
+
"isStatic": false,
|
|
7641
|
+
"isProtected": false,
|
|
7642
|
+
"isAbstract": false
|
|
7643
|
+
},
|
|
7644
|
+
{
|
|
7645
|
+
"kind": "Property",
|
|
7646
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError#limitTokens:member",
|
|
7647
|
+
"docComment": "/**\n * Window size the provider reported, when its message stated one.\n */\n",
|
|
7648
|
+
"excerptTokens": [
|
|
7649
|
+
{
|
|
7650
|
+
"kind": "Content",
|
|
7651
|
+
"text": "readonly limitTokens?: "
|
|
7652
|
+
},
|
|
7653
|
+
{
|
|
7654
|
+
"kind": "Content",
|
|
7655
|
+
"text": "number"
|
|
7656
|
+
},
|
|
7657
|
+
{
|
|
7658
|
+
"kind": "Content",
|
|
7659
|
+
"text": ";"
|
|
7660
|
+
}
|
|
7661
|
+
],
|
|
7662
|
+
"isReadonly": true,
|
|
7663
|
+
"isOptional": true,
|
|
7664
|
+
"releaseTag": "Beta",
|
|
7665
|
+
"name": "limitTokens",
|
|
7666
|
+
"propertyTypeTokenRange": {
|
|
7667
|
+
"startIndex": 1,
|
|
7668
|
+
"endIndex": 2
|
|
7669
|
+
},
|
|
7670
|
+
"isStatic": false,
|
|
7671
|
+
"isProtected": false,
|
|
7672
|
+
"isAbstract": false
|
|
7673
|
+
},
|
|
7674
|
+
{
|
|
7675
|
+
"kind": "Property",
|
|
7676
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError#promptTokens:member",
|
|
7677
|
+
"docComment": "/**\n * Prompt size the provider reported, when its message stated one.\n */\n",
|
|
7678
|
+
"excerptTokens": [
|
|
7679
|
+
{
|
|
7680
|
+
"kind": "Content",
|
|
7681
|
+
"text": "readonly promptTokens?: "
|
|
7682
|
+
},
|
|
7683
|
+
{
|
|
7684
|
+
"kind": "Content",
|
|
7685
|
+
"text": "number"
|
|
7686
|
+
},
|
|
7687
|
+
{
|
|
7688
|
+
"kind": "Content",
|
|
7689
|
+
"text": ";"
|
|
7690
|
+
}
|
|
7691
|
+
],
|
|
7692
|
+
"isReadonly": true,
|
|
7693
|
+
"isOptional": true,
|
|
7694
|
+
"releaseTag": "Beta",
|
|
7695
|
+
"name": "promptTokens",
|
|
7696
|
+
"propertyTypeTokenRange": {
|
|
7697
|
+
"startIndex": 1,
|
|
7698
|
+
"endIndex": 2
|
|
7699
|
+
},
|
|
7700
|
+
"isStatic": false,
|
|
7701
|
+
"isProtected": false,
|
|
7702
|
+
"isAbstract": false
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
"kind": "Property",
|
|
7706
|
+
"canonicalReference": "@genesislcap/foundation-ai!ContextOverflowError#vendorLabel:member",
|
|
7707
|
+
"docComment": "/**\n * Vendor label of the transport that refused (e.g. `'Anthropic'`).\n */\n",
|
|
7708
|
+
"excerptTokens": [
|
|
7709
|
+
{
|
|
7710
|
+
"kind": "Content",
|
|
7711
|
+
"text": "readonly vendorLabel: "
|
|
7712
|
+
},
|
|
7713
|
+
{
|
|
7714
|
+
"kind": "Content",
|
|
7715
|
+
"text": "string"
|
|
7716
|
+
},
|
|
7717
|
+
{
|
|
7718
|
+
"kind": "Content",
|
|
7719
|
+
"text": ";"
|
|
7720
|
+
}
|
|
7721
|
+
],
|
|
7722
|
+
"isReadonly": true,
|
|
7723
|
+
"isOptional": false,
|
|
7724
|
+
"releaseTag": "Beta",
|
|
7725
|
+
"name": "vendorLabel",
|
|
7726
|
+
"propertyTypeTokenRange": {
|
|
7727
|
+
"startIndex": 1,
|
|
7728
|
+
"endIndex": 2
|
|
7729
|
+
},
|
|
7730
|
+
"isStatic": false,
|
|
7731
|
+
"isProtected": false,
|
|
7732
|
+
"isAbstract": false
|
|
7733
|
+
}
|
|
7734
|
+
],
|
|
7735
|
+
"extendsTokenRange": {
|
|
7736
|
+
"startIndex": 1,
|
|
7737
|
+
"endIndex": 2
|
|
7738
|
+
},
|
|
7739
|
+
"implementsTokenRanges": []
|
|
7740
|
+
},
|
|
7741
|
+
{
|
|
7742
|
+
"kind": "Function",
|
|
7743
|
+
"canonicalReference": "@genesislcap/foundation-ai!contextOverflowOf:function(1)",
|
|
7744
|
+
"docComment": "/**\n * Classify a rejection as a context overflow, returning the reported figures when the provider stated them, or `undefined` when it is something else.\n *\n * Vendor-agnostic, unlike `providerRefusalOf`: the failure is a property of the request rather than of a vendor's account model, both observed shapes are a `400` with a phrase, and — critically — a false positive here cannot break a retry ladder, so the caution that scopes the spend classifier to Anthropic does not apply.\n *\n * @beta\n */\n",
|
|
7745
|
+
"excerptTokens": [
|
|
7746
|
+
{
|
|
7747
|
+
"kind": "Content",
|
|
7748
|
+
"text": "export declare function contextOverflowOf(_vendor: "
|
|
7749
|
+
},
|
|
7750
|
+
{
|
|
7751
|
+
"kind": "Reference",
|
|
7752
|
+
"text": "AIProviderType",
|
|
7753
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
7754
|
+
},
|
|
7755
|
+
{
|
|
7756
|
+
"kind": "Content",
|
|
7757
|
+
"text": " | undefined"
|
|
7758
|
+
},
|
|
7759
|
+
{
|
|
7760
|
+
"kind": "Content",
|
|
7761
|
+
"text": ", status: "
|
|
7762
|
+
},
|
|
7763
|
+
{
|
|
7764
|
+
"kind": "Content",
|
|
7765
|
+
"text": "number | undefined"
|
|
7766
|
+
},
|
|
7767
|
+
{
|
|
7768
|
+
"kind": "Content",
|
|
7769
|
+
"text": ", payload: "
|
|
7770
|
+
},
|
|
7771
|
+
{
|
|
7772
|
+
"kind": "Content",
|
|
7773
|
+
"text": "unknown"
|
|
7774
|
+
},
|
|
7775
|
+
{
|
|
7776
|
+
"kind": "Content",
|
|
7777
|
+
"text": "): "
|
|
7778
|
+
},
|
|
7779
|
+
{
|
|
7780
|
+
"kind": "Content",
|
|
7781
|
+
"text": "{\n promptTokens?: number;\n limitTokens?: number;\n message?: string;\n} | undefined"
|
|
7782
|
+
},
|
|
7783
|
+
{
|
|
7784
|
+
"kind": "Content",
|
|
7785
|
+
"text": ";"
|
|
7786
|
+
}
|
|
7787
|
+
],
|
|
7788
|
+
"fileUrlPath": "src/transports/context-overflow-error.ts",
|
|
7789
|
+
"returnTypeTokenRange": {
|
|
7790
|
+
"startIndex": 8,
|
|
7791
|
+
"endIndex": 9
|
|
7792
|
+
},
|
|
7793
|
+
"releaseTag": "Beta",
|
|
7794
|
+
"overloadIndex": 1,
|
|
7795
|
+
"parameters": [
|
|
7796
|
+
{
|
|
7797
|
+
"parameterName": "_vendor",
|
|
7798
|
+
"parameterTypeTokenRange": {
|
|
7799
|
+
"startIndex": 1,
|
|
7800
|
+
"endIndex": 3
|
|
7801
|
+
},
|
|
7802
|
+
"isOptional": false
|
|
7803
|
+
},
|
|
7804
|
+
{
|
|
7805
|
+
"parameterName": "status",
|
|
7806
|
+
"parameterTypeTokenRange": {
|
|
7807
|
+
"startIndex": 4,
|
|
7808
|
+
"endIndex": 5
|
|
7809
|
+
},
|
|
7810
|
+
"isOptional": false
|
|
7811
|
+
},
|
|
7812
|
+
{
|
|
7813
|
+
"parameterName": "payload",
|
|
7814
|
+
"parameterTypeTokenRange": {
|
|
7815
|
+
"startIndex": 6,
|
|
7816
|
+
"endIndex": 7
|
|
7817
|
+
},
|
|
7818
|
+
"isOptional": false
|
|
7819
|
+
}
|
|
7820
|
+
],
|
|
7821
|
+
"name": "contextOverflowOf"
|
|
7822
|
+
},
|
|
7328
7823
|
{
|
|
7329
7824
|
"kind": "Interface",
|
|
7330
7825
|
"canonicalReference": "@genesislcap/foundation-ai!CostReportingTransport:interface",
|
|
@@ -7808,6 +8303,29 @@
|
|
|
7808
8303
|
"endIndex": 0
|
|
7809
8304
|
}
|
|
7810
8305
|
},
|
|
8306
|
+
{
|
|
8307
|
+
"kind": "Variable",
|
|
8308
|
+
"canonicalReference": "@genesislcap/foundation-ai!DEFAULT_CONTEXT_OVERFLOW_MESSAGE:var",
|
|
8309
|
+
"docComment": "/**\n * The single sentence shown to a user whose request overran the context window.\n *\n * Unlike {@link DEFAULT_PROVIDER_REFUSED_MESSAGE} this one deliberately DOES name a cause and an action, because both are true and both are the user's: they can see the conversation that caused it, and compacting fixes it. Telling them it \"needs no action from you\" would be the wrong advice as well as the wrong fact.\n *\n * @beta\n */\n",
|
|
8310
|
+
"excerptTokens": [
|
|
8311
|
+
{
|
|
8312
|
+
"kind": "Content",
|
|
8313
|
+
"text": "DEFAULT_CONTEXT_OVERFLOW_MESSAGE: "
|
|
8314
|
+
},
|
|
8315
|
+
{
|
|
8316
|
+
"kind": "Content",
|
|
8317
|
+
"text": "string"
|
|
8318
|
+
}
|
|
8319
|
+
],
|
|
8320
|
+
"fileUrlPath": "src/transports/context-overflow-error.ts",
|
|
8321
|
+
"isReadonly": true,
|
|
8322
|
+
"releaseTag": "Beta",
|
|
8323
|
+
"name": "DEFAULT_CONTEXT_OVERFLOW_MESSAGE",
|
|
8324
|
+
"variableTypeTokenRange": {
|
|
8325
|
+
"startIndex": 1,
|
|
8326
|
+
"endIndex": 2
|
|
8327
|
+
}
|
|
8328
|
+
},
|
|
7811
8329
|
{
|
|
7812
8330
|
"kind": "Variable",
|
|
7813
8331
|
"canonicalReference": "@genesislcap/foundation-ai!DEFAULT_PROVIDER_REFUSED_MESSAGE:var",
|
|
@@ -11615,7 +12133,7 @@
|
|
|
11615
12133
|
},
|
|
11616
12134
|
{
|
|
11617
12135
|
"kind": "Content",
|
|
11618
|
-
"text": "'max_iterations' | 'malformed_tool_call' | 'empty_response' | 'unknown_tool_limit' | 'timeout' | 'response_truncated' | 'refusal' | 'budget_exhausted'\n/**\n * The upstream vendor refused the account (GENC-1506). **Terminal for the PARENT turn too**, on the\n * same reasoning as `budget_exhausted`: the parent cannot recover by calling the model again,\n * because the very next call hits the same wall. N batched sub-agent calls would otherwise cost N\n * doomed children AND a doomed parent call.\n */\n | 'provider_refused'"
|
|
12136
|
+
"text": "'max_iterations' | 'malformed_tool_call' | 'empty_response' | 'unknown_tool_limit' | 'timeout' | 'response_truncated' | 'refusal' | 'budget_exhausted'\n/**\n * The upstream vendor refused the account (GENC-1506). **Terminal for the PARENT turn too**, on the\n * same reasoning as `budget_exhausted`: the parent cannot recover by calling the model again,\n * because the very next call hits the same wall. N batched sub-agent calls would otherwise cost N\n * doomed children AND a doomed parent call.\n */\n | 'provider_refused'\n/**\n * The sub-agent was stopped because continuing would have overrun the context\n * window (GENC-1567). **Terminal for the PARENT turn too**, on the same\n * reasoning as `budget_exhausted` and `provider_refused`: the parent shares the\n * conversation whose size caused it, so calling the model again hits the same\n * wall.\n */\n | 'context_exhausted'"
|
|
11619
12137
|
},
|
|
11620
12138
|
{
|
|
11621
12139
|
"kind": "Content",
|
|
@@ -12162,7 +12680,7 @@
|
|
|
12162
12680
|
},
|
|
12163
12681
|
{
|
|
12164
12682
|
"kind": "Content",
|
|
12165
|
-
"text": "'exception' | 'malformed-function-call' | 'empty-response' | 'unknown-tool-limit' | 'max-iterations' | 'response-truncated' | 'refusal' | 'budget-exhausted' | 'provider-refused'"
|
|
12683
|
+
"text": "'exception' | 'malformed-function-call' | 'empty-response' | 'unknown-tool-limit' | 'max-iterations' | 'response-truncated' | 'refusal' | 'budget-exhausted' | 'provider-refused'\n/**\n * The turn was stopped because continuing it would have overrun the model's\n * context window (GENC-1567). Pre-emptive: the driver ends the tool loop at\n * the edge rather than issuing a request the provider would reject, so the\n * transcript stays intact and compaction is still possible.\n */\n | 'context-exhausted'"
|
|
12166
12684
|
},
|
|
12167
12685
|
{
|
|
12168
12686
|
"kind": "Content",
|