@genesislcap/foundation-ai 14.466.0 → 14.467.0-GNEC-1369.1
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
CHANGED
|
@@ -8,7 +8,7 @@ export { AI_FEATURE_FLAG, isAIFeatureEnabled } from './utils/feature-flags';
|
|
|
8
8
|
export { ChatTemperature } from './utils/temperature';
|
|
9
9
|
export { SUPPORTED_ANTHROPIC_MODEL_IDS, SUPPORTED_GEMINI_MODEL_IDS } from './types';
|
|
10
10
|
export type { AIConfig, AIStatus, AIProviderType, AnthropicAIConfig, AnthropicModelId, ChromeAIConfig, ChromeAvailability, GeminiAIConfig, GeminiModelId, ServerAIConfig, } from './types';
|
|
11
|
-
export type { AgentPickerMode, ChatAgentConfig, ChatAgentPickerConfig, ChatAnimationsConfig, ChatAttachment, ChatConfig, ChatDriverResult, ChatInputDuringExecutionMode, ChatMessage, ChatInteraction, ChatRequestOptions, ChatResponseMeta, ChatRole, ChatStreamChunk, ChatToolCall, ChatToolCallUnknown, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, ChatUiConfig, ChatSuggestionsConfig, InteractionPresentation, InteractionRequestOptions, InteractionResult, SubAgentFailureReason, SubAgentRequestOptions, } from './types/chat.types';
|
|
11
|
+
export type { AgentPickerMode, ChatAgentConfig, ChatAgentPickerConfig, ChatAnimationsConfig, ChatAttachment, ChatConfig, ChatDriverResult, ChatInputDuringExecutionMode, ChatMessage, ChatInteraction, ChatRequestOptions, ChatResponseMeta, ChatRole, ChatStreamChunk, ChatToolCall, ChatToolCallUnknown, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, ChatUiConfig, CondensePolicy, CondenseResult, CondenseTrigger, ChatSuggestionsConfig, InteractionPresentation, InteractionRequestOptions, InteractionResult, SubAgentFailureReason, SubAgentRequestOptions, } from './types/chat.types';
|
|
12
12
|
export { isChatToolCallUnknown } from './types/chat.types';
|
|
13
13
|
export type { ChatTransport } from './types/chat-transport.types';
|
|
14
14
|
export type { CostReportingTransport } from './types/transports.types';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,6BAA6B,EAC7B,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACpF,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,g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6BAA6B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACpF,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1E,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -388,6 +388,65 @@ export interface InteractionRequestOptions {
|
|
|
388
388
|
* @beta
|
|
389
389
|
*/
|
|
390
390
|
export type SubAgentFailureReason = 'max_iterations' | 'malformed_tool_call' | 'empty_response' | 'unknown_tool_limit' | 'timeout';
|
|
391
|
+
/**
|
|
392
|
+
* When a tool call's declared payload(s) become stale and should be condensed
|
|
393
|
+
* out of the to-model history. Discriminated — supersession and age are
|
|
394
|
+
* mutually exclusive, so only the relevant field is present.
|
|
395
|
+
*
|
|
396
|
+
* - `superseded` — keep only the LATEST call sharing `by` in the history sent
|
|
397
|
+
* to the model; collapse the targeted payload of all earlier ones. The natural
|
|
398
|
+
* key is the resource identity (e.g. a file path), so reads and writes of the
|
|
399
|
+
* same path share a `by` and an earlier read collapses once a later write/read
|
|
400
|
+
* of the same path lands. A re-call with the same `by` re-arms automatically.
|
|
401
|
+
* - `age` — a tool result first reaches the model on the turn AFTER the call, so
|
|
402
|
+
* `turns` is how many model calls may see the full result before it collapses:
|
|
403
|
+
* `turns: 1` lets the model read it on exactly one turn, then collapses it on
|
|
404
|
+
* the next; `turns: 2` keeps it for two; and so on. Use `turns >= 1` — a
|
|
405
|
+
* sub-agent invocation counts as one call in the parent loop. For keyless
|
|
406
|
+
* payloads (grep / source / doc dumps).
|
|
407
|
+
*
|
|
408
|
+
* @beta
|
|
409
|
+
*/
|
|
410
|
+
export type CondenseTrigger = {
|
|
411
|
+
kind: 'superseded';
|
|
412
|
+
by: string;
|
|
413
|
+
} | {
|
|
414
|
+
kind: 'age';
|
|
415
|
+
turns: number;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* How a stale payload is replaced in the to-model slice.
|
|
419
|
+
*
|
|
420
|
+
* - `'pointer'` — a framework-generated, re-readable stub with a "re-call to
|
|
421
|
+
* restore" hint. Safe ONLY for idempotent tools (re-calling reproduces the
|
|
422
|
+
* content); the framework cannot detect idempotency, so the author asserts it
|
|
423
|
+
* by choosing `'pointer'`.
|
|
424
|
+
* - `'drop'` — a minimal placeholder, no breadcrumb. Use when the content is
|
|
425
|
+
* provably never needed again (e.g. superseded write args).
|
|
426
|
+
* - `{ replaceWith }` — a tool-authored summary string, computed at declaration
|
|
427
|
+
* time (the handler has the content then). Left verbatim — no restore hint —
|
|
428
|
+
* so it is the correct choice for non-idempotent tools and semantic summaries.
|
|
429
|
+
*
|
|
430
|
+
* @beta
|
|
431
|
+
*/
|
|
432
|
+
export type CondenseResult = 'pointer' | 'drop' | {
|
|
433
|
+
replaceWith: string;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Declarative policy passed to `condenseWhen`. The trigger (`on`) is shared by
|
|
437
|
+
* both payloads of the call; the args and response are replaced independently.
|
|
438
|
+
* Presence of `args` / `response` IS the target — at least one must be set.
|
|
439
|
+
*
|
|
440
|
+
* @beta
|
|
441
|
+
*/
|
|
442
|
+
export interface CondensePolicy {
|
|
443
|
+
/** When the call's payload(s) go stale. */
|
|
444
|
+
on: CondenseTrigger;
|
|
445
|
+
/** Condense the tool-call ARGS (on the assistant message). Omit to leave untouched. */
|
|
446
|
+
args?: CondenseResult;
|
|
447
|
+
/** Condense the tool RESULT (on the tool message). Omit to leave untouched. */
|
|
448
|
+
response?: CondenseResult;
|
|
449
|
+
}
|
|
391
450
|
/**
|
|
392
451
|
* Map of tool name to async handler function.
|
|
393
452
|
*
|
|
@@ -449,6 +508,21 @@ export type ChatToolHandlers<TSubAgent extends {
|
|
|
449
508
|
* guards the flow can release.
|
|
450
509
|
*/
|
|
451
510
|
releaseAgent?: () => void;
|
|
511
|
+
/**
|
|
512
|
+
* Declare how THIS tool call's payload(s) should be condensed out of the
|
|
513
|
+
* history sent to the model once they go stale (see {@link CondensePolicy}).
|
|
514
|
+
* Applied to the model-bound history only — stored history (UI, debug
|
|
515
|
+
* export) is never mutated. No-op if neither `args` nor `response` is set.
|
|
516
|
+
*
|
|
517
|
+
* Opt-in and computed at call time: the handler can pass different params
|
|
518
|
+
* on each invocation (e.g. `by: args.path`) or skip the call entirely for
|
|
519
|
+
* a payload it wants to keep. Only the first call per tool invocation is
|
|
520
|
+
* honoured; a second call for the same tool call is ignored.
|
|
521
|
+
*
|
|
522
|
+
* `'pointer'` is valid only for idempotent tools (it promises a re-call
|
|
523
|
+
* restores the content); non-idempotent tools must use `replaceWith`.
|
|
524
|
+
*/
|
|
525
|
+
condenseWhen: (policy: CondensePolicy) => void;
|
|
452
526
|
}) => Promise<unknown>>;
|
|
453
527
|
/**
|
|
454
528
|
* Controls whether (and how) the model may call a tool on a given turn. Maps to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.types.d.ts","sourceRoot":"","sources":["../../../src/types/chat.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEpG;;;;GAIG;AACH,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG;IACnD,OAAO,EAAE,IAAI,CAAC;IACd,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,YAAY,GAAG,EAAE,IAAI,mBAAmB,CAEjF;AAED;;;;GAIG;AACH,MAAM,WAAW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ChE,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IACE,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,GACD;IACE;;;OAGG;IACH,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -4344,7 +4344,16 @@
|
|
|
4344
4344
|
},
|
|
4345
4345
|
{
|
|
4346
4346
|
"kind": "Content",
|
|
4347
|
-
"text": ";\n }>;\n completeSubAgent?: (result: unknown) => void;\n releaseAgent?: () => void;\n
|
|
4347
|
+
"text": ";\n }>;\n completeSubAgent?: (result: unknown) => void;\n releaseAgent?: () => void;\n condenseWhen: (policy: "
|
|
4348
|
+
},
|
|
4349
|
+
{
|
|
4350
|
+
"kind": "Reference",
|
|
4351
|
+
"text": "CondensePolicy",
|
|
4352
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondensePolicy:interface"
|
|
4353
|
+
},
|
|
4354
|
+
{
|
|
4355
|
+
"kind": "Content",
|
|
4356
|
+
"text": ") => void;\n}) => "
|
|
4348
4357
|
},
|
|
4349
4358
|
{
|
|
4350
4359
|
"kind": "Reference",
|
|
@@ -4378,7 +4387,7 @@
|
|
|
4378
4387
|
],
|
|
4379
4388
|
"typeTokenRange": {
|
|
4380
4389
|
"startIndex": 5,
|
|
4381
|
-
"endIndex":
|
|
4390
|
+
"endIndex": 23
|
|
4382
4391
|
}
|
|
4383
4392
|
},
|
|
4384
4393
|
{
|
|
@@ -5201,6 +5210,160 @@
|
|
|
5201
5210
|
"endIndex": 2
|
|
5202
5211
|
}
|
|
5203
5212
|
},
|
|
5213
|
+
{
|
|
5214
|
+
"kind": "Interface",
|
|
5215
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondensePolicy:interface",
|
|
5216
|
+
"docComment": "/**\n * Declarative policy passed to `condenseWhen`. The trigger (`on`) is shared by both payloads of the call; the args and response are replaced independently. Presence of `args` / `response` IS the target — at least one must be set.\n *\n * @beta\n */\n",
|
|
5217
|
+
"excerptTokens": [
|
|
5218
|
+
{
|
|
5219
|
+
"kind": "Content",
|
|
5220
|
+
"text": "export interface CondensePolicy "
|
|
5221
|
+
}
|
|
5222
|
+
],
|
|
5223
|
+
"fileUrlPath": "src/types/chat.types.ts",
|
|
5224
|
+
"releaseTag": "Beta",
|
|
5225
|
+
"name": "CondensePolicy",
|
|
5226
|
+
"preserveMemberOrder": false,
|
|
5227
|
+
"members": [
|
|
5228
|
+
{
|
|
5229
|
+
"kind": "PropertySignature",
|
|
5230
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondensePolicy#args:member",
|
|
5231
|
+
"docComment": "/**\n * Condense the tool-call ARGS (on the assistant message). Omit to leave untouched.\n */\n",
|
|
5232
|
+
"excerptTokens": [
|
|
5233
|
+
{
|
|
5234
|
+
"kind": "Content",
|
|
5235
|
+
"text": "args?: "
|
|
5236
|
+
},
|
|
5237
|
+
{
|
|
5238
|
+
"kind": "Reference",
|
|
5239
|
+
"text": "CondenseResult",
|
|
5240
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondenseResult:type"
|
|
5241
|
+
},
|
|
5242
|
+
{
|
|
5243
|
+
"kind": "Content",
|
|
5244
|
+
"text": ";"
|
|
5245
|
+
}
|
|
5246
|
+
],
|
|
5247
|
+
"isReadonly": false,
|
|
5248
|
+
"isOptional": true,
|
|
5249
|
+
"releaseTag": "Beta",
|
|
5250
|
+
"name": "args",
|
|
5251
|
+
"propertyTypeTokenRange": {
|
|
5252
|
+
"startIndex": 1,
|
|
5253
|
+
"endIndex": 2
|
|
5254
|
+
}
|
|
5255
|
+
},
|
|
5256
|
+
{
|
|
5257
|
+
"kind": "PropertySignature",
|
|
5258
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondensePolicy#on:member",
|
|
5259
|
+
"docComment": "/**\n * When the call's payload(s) go stale.\n */\n",
|
|
5260
|
+
"excerptTokens": [
|
|
5261
|
+
{
|
|
5262
|
+
"kind": "Content",
|
|
5263
|
+
"text": "on: "
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
"kind": "Reference",
|
|
5267
|
+
"text": "CondenseTrigger",
|
|
5268
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondenseTrigger:type"
|
|
5269
|
+
},
|
|
5270
|
+
{
|
|
5271
|
+
"kind": "Content",
|
|
5272
|
+
"text": ";"
|
|
5273
|
+
}
|
|
5274
|
+
],
|
|
5275
|
+
"isReadonly": false,
|
|
5276
|
+
"isOptional": false,
|
|
5277
|
+
"releaseTag": "Beta",
|
|
5278
|
+
"name": "on",
|
|
5279
|
+
"propertyTypeTokenRange": {
|
|
5280
|
+
"startIndex": 1,
|
|
5281
|
+
"endIndex": 2
|
|
5282
|
+
}
|
|
5283
|
+
},
|
|
5284
|
+
{
|
|
5285
|
+
"kind": "PropertySignature",
|
|
5286
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondensePolicy#response:member",
|
|
5287
|
+
"docComment": "/**\n * Condense the tool RESULT (on the tool message). Omit to leave untouched.\n */\n",
|
|
5288
|
+
"excerptTokens": [
|
|
5289
|
+
{
|
|
5290
|
+
"kind": "Content",
|
|
5291
|
+
"text": "response?: "
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"kind": "Reference",
|
|
5295
|
+
"text": "CondenseResult",
|
|
5296
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondenseResult:type"
|
|
5297
|
+
},
|
|
5298
|
+
{
|
|
5299
|
+
"kind": "Content",
|
|
5300
|
+
"text": ";"
|
|
5301
|
+
}
|
|
5302
|
+
],
|
|
5303
|
+
"isReadonly": false,
|
|
5304
|
+
"isOptional": true,
|
|
5305
|
+
"releaseTag": "Beta",
|
|
5306
|
+
"name": "response",
|
|
5307
|
+
"propertyTypeTokenRange": {
|
|
5308
|
+
"startIndex": 1,
|
|
5309
|
+
"endIndex": 2
|
|
5310
|
+
}
|
|
5311
|
+
}
|
|
5312
|
+
],
|
|
5313
|
+
"extendsTokenRanges": []
|
|
5314
|
+
},
|
|
5315
|
+
{
|
|
5316
|
+
"kind": "TypeAlias",
|
|
5317
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondenseResult:type",
|
|
5318
|
+
"docComment": "/**\n * How a stale payload is replaced in the to-model slice.\n *\n * - `'pointer'` — a framework-generated, re-readable stub with a \"re-call to restore\" hint. Safe ONLY for idempotent tools (re-calling reproduces the content); the framework cannot detect idempotency, so the author asserts it by choosing `'pointer'`. - `'drop'` — a minimal placeholder, no breadcrumb. Use when the content is provably never needed again (e.g. superseded write args). - `{ replaceWith }` — a tool-authored summary string, computed at declaration time (the handler has the content then). Left verbatim — no restore hint — so it is the correct choice for non-idempotent tools and semantic summaries.\n *\n * @beta\n */\n",
|
|
5319
|
+
"excerptTokens": [
|
|
5320
|
+
{
|
|
5321
|
+
"kind": "Content",
|
|
5322
|
+
"text": "export type CondenseResult = "
|
|
5323
|
+
},
|
|
5324
|
+
{
|
|
5325
|
+
"kind": "Content",
|
|
5326
|
+
"text": "'pointer' | 'drop' | {\n replaceWith: string;\n}"
|
|
5327
|
+
},
|
|
5328
|
+
{
|
|
5329
|
+
"kind": "Content",
|
|
5330
|
+
"text": ";"
|
|
5331
|
+
}
|
|
5332
|
+
],
|
|
5333
|
+
"fileUrlPath": "src/types/chat.types.ts",
|
|
5334
|
+
"releaseTag": "Beta",
|
|
5335
|
+
"name": "CondenseResult",
|
|
5336
|
+
"typeTokenRange": {
|
|
5337
|
+
"startIndex": 1,
|
|
5338
|
+
"endIndex": 2
|
|
5339
|
+
}
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
"kind": "TypeAlias",
|
|
5343
|
+
"canonicalReference": "@genesislcap/foundation-ai!CondenseTrigger:type",
|
|
5344
|
+
"docComment": "/**\n * When a tool call's declared payload(s) become stale and should be condensed out of the to-model history. Discriminated — supersession and age are mutually exclusive, so only the relevant field is present.\n *\n * - `superseded` — keep only the LATEST call sharing `by` in the history sent to the model; collapse the targeted payload of all earlier ones. The natural key is the resource identity (e.g. a file path), so reads and writes of the same path share a `by` and an earlier read collapses once a later write/read of the same path lands. A re-call with the same `by` re-arms automatically. - `age` — a tool result first reaches the model on the turn AFTER the call, so `turns` is how many model calls may see the full result before it collapses: `turns: 1` lets the model read it on exactly one turn, then collapses it on the next; `turns: 2` keeps it for two; and so on. Use `turns >= 1` — a sub-agent invocation counts as one call in the parent loop. For keyless payloads (grep / source / doc dumps).\n *\n * @beta\n */\n",
|
|
5345
|
+
"excerptTokens": [
|
|
5346
|
+
{
|
|
5347
|
+
"kind": "Content",
|
|
5348
|
+
"text": "export type CondenseTrigger = "
|
|
5349
|
+
},
|
|
5350
|
+
{
|
|
5351
|
+
"kind": "Content",
|
|
5352
|
+
"text": "{\n kind: 'superseded';\n by: string;\n} | {\n kind: 'age';\n turns: number;\n}"
|
|
5353
|
+
},
|
|
5354
|
+
{
|
|
5355
|
+
"kind": "Content",
|
|
5356
|
+
"text": ";"
|
|
5357
|
+
}
|
|
5358
|
+
],
|
|
5359
|
+
"fileUrlPath": "src/types/chat.types.ts",
|
|
5360
|
+
"releaseTag": "Beta",
|
|
5361
|
+
"name": "CondenseTrigger",
|
|
5362
|
+
"typeTokenRange": {
|
|
5363
|
+
"startIndex": 1,
|
|
5364
|
+
"endIndex": 2
|
|
5365
|
+
}
|
|
5366
|
+
},
|
|
5204
5367
|
{
|
|
5205
5368
|
"kind": "Interface",
|
|
5206
5369
|
"canonicalReference": "@genesislcap/foundation-ai!CostReportingTransport:interface",
|
package/dist/foundation-ai.d.ts
CHANGED
|
@@ -874,6 +874,21 @@ export declare type ChatToolHandlers<TSubAgent extends {
|
|
|
874
874
|
* guards the flow can release.
|
|
875
875
|
*/
|
|
876
876
|
releaseAgent?: () => void;
|
|
877
|
+
/**
|
|
878
|
+
* Declare how THIS tool call's payload(s) should be condensed out of the
|
|
879
|
+
* history sent to the model once they go stale (see {@link CondensePolicy}).
|
|
880
|
+
* Applied to the model-bound history only — stored history (UI, debug
|
|
881
|
+
* export) is never mutated. No-op if neither `args` nor `response` is set.
|
|
882
|
+
*
|
|
883
|
+
* Opt-in and computed at call time: the handler can pass different params
|
|
884
|
+
* on each invocation (e.g. `by: args.path`) or skip the call entirely for
|
|
885
|
+
* a payload it wants to keep. Only the first call per tool invocation is
|
|
886
|
+
* honoured; a second call for the same tool call is ignored.
|
|
887
|
+
*
|
|
888
|
+
* `'pointer'` is valid only for idempotent tools (it promises a re-call
|
|
889
|
+
* restores the content); non-idempotent tools must use `replaceWith`.
|
|
890
|
+
*/
|
|
891
|
+
condenseWhen: (policy: CondensePolicy) => void;
|
|
877
892
|
}) => Promise<unknown>>;
|
|
878
893
|
|
|
879
894
|
/**
|
|
@@ -1011,6 +1026,68 @@ export declare interface ChromeAIConfig extends AIProviderConfig {
|
|
|
1011
1026
|
*/
|
|
1012
1027
|
export declare type ChromeAvailability = 'available' | 'downloading' | 'downloadable' | 'unavailable';
|
|
1013
1028
|
|
|
1029
|
+
/**
|
|
1030
|
+
* Declarative policy passed to `condenseWhen`. The trigger (`on`) is shared by
|
|
1031
|
+
* both payloads of the call; the args and response are replaced independently.
|
|
1032
|
+
* Presence of `args` / `response` IS the target — at least one must be set.
|
|
1033
|
+
*
|
|
1034
|
+
* @beta
|
|
1035
|
+
*/
|
|
1036
|
+
export declare interface CondensePolicy {
|
|
1037
|
+
/** When the call's payload(s) go stale. */
|
|
1038
|
+
on: CondenseTrigger;
|
|
1039
|
+
/** Condense the tool-call ARGS (on the assistant message). Omit to leave untouched. */
|
|
1040
|
+
args?: CondenseResult;
|
|
1041
|
+
/** Condense the tool RESULT (on the tool message). Omit to leave untouched. */
|
|
1042
|
+
response?: CondenseResult;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* How a stale payload is replaced in the to-model slice.
|
|
1047
|
+
*
|
|
1048
|
+
* - `'pointer'` — a framework-generated, re-readable stub with a "re-call to
|
|
1049
|
+
* restore" hint. Safe ONLY for idempotent tools (re-calling reproduces the
|
|
1050
|
+
* content); the framework cannot detect idempotency, so the author asserts it
|
|
1051
|
+
* by choosing `'pointer'`.
|
|
1052
|
+
* - `'drop'` — a minimal placeholder, no breadcrumb. Use when the content is
|
|
1053
|
+
* provably never needed again (e.g. superseded write args).
|
|
1054
|
+
* - `{ replaceWith }` — a tool-authored summary string, computed at declaration
|
|
1055
|
+
* time (the handler has the content then). Left verbatim — no restore hint —
|
|
1056
|
+
* so it is the correct choice for non-idempotent tools and semantic summaries.
|
|
1057
|
+
*
|
|
1058
|
+
* @beta
|
|
1059
|
+
*/
|
|
1060
|
+
export declare type CondenseResult = 'pointer' | 'drop' | {
|
|
1061
|
+
replaceWith: string;
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* When a tool call's declared payload(s) become stale and should be condensed
|
|
1066
|
+
* out of the to-model history. Discriminated — supersession and age are
|
|
1067
|
+
* mutually exclusive, so only the relevant field is present.
|
|
1068
|
+
*
|
|
1069
|
+
* - `superseded` — keep only the LATEST call sharing `by` in the history sent
|
|
1070
|
+
* to the model; collapse the targeted payload of all earlier ones. The natural
|
|
1071
|
+
* key is the resource identity (e.g. a file path), so reads and writes of the
|
|
1072
|
+
* same path share a `by` and an earlier read collapses once a later write/read
|
|
1073
|
+
* of the same path lands. A re-call with the same `by` re-arms automatically.
|
|
1074
|
+
* - `age` — a tool result first reaches the model on the turn AFTER the call, so
|
|
1075
|
+
* `turns` is how many model calls may see the full result before it collapses:
|
|
1076
|
+
* `turns: 1` lets the model read it on exactly one turn, then collapses it on
|
|
1077
|
+
* the next; `turns: 2` keeps it for two; and so on. Use `turns >= 1` — a
|
|
1078
|
+
* sub-agent invocation counts as one call in the parent loop. For keyless
|
|
1079
|
+
* payloads (grep / source / doc dumps).
|
|
1080
|
+
*
|
|
1081
|
+
* @beta
|
|
1082
|
+
*/
|
|
1083
|
+
export declare type CondenseTrigger = {
|
|
1084
|
+
kind: 'superseded';
|
|
1085
|
+
by: string;
|
|
1086
|
+
} | {
|
|
1087
|
+
kind: 'age';
|
|
1088
|
+
turns: number;
|
|
1089
|
+
};
|
|
1090
|
+
|
|
1014
1091
|
/**
|
|
1015
1092
|
* Optional capability implemented by transports that can report the estimated
|
|
1016
1093
|
* USD cost they have incurred over their lifetime.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ai",
|
|
3
3
|
"description": "Genesis Foundation AI - Provider-agnostic AI configuration and shared utilities",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.467.0-GNEC-1369.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@genesislcap/foundation-testing": "14.
|
|
56
|
-
"@genesislcap/genx": "14.
|
|
57
|
-
"@genesislcap/rollup-builder": "14.
|
|
58
|
-
"@genesislcap/ts-builder": "14.
|
|
59
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
60
|
-
"@genesislcap/vite-builder": "14.
|
|
61
|
-
"@genesislcap/webpack-builder": "14.
|
|
55
|
+
"@genesislcap/foundation-testing": "14.467.0-GNEC-1369.1",
|
|
56
|
+
"@genesislcap/genx": "14.467.0-GNEC-1369.1",
|
|
57
|
+
"@genesislcap/rollup-builder": "14.467.0-GNEC-1369.1",
|
|
58
|
+
"@genesislcap/ts-builder": "14.467.0-GNEC-1369.1",
|
|
59
|
+
"@genesislcap/uvu-playwright-builder": "14.467.0-GNEC-1369.1",
|
|
60
|
+
"@genesislcap/vite-builder": "14.467.0-GNEC-1369.1",
|
|
61
|
+
"@genesislcap/webpack-builder": "14.467.0-GNEC-1369.1"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@genesislcap/foundation-logger": "14.
|
|
65
|
-
"@genesislcap/foundation-utils": "14.
|
|
64
|
+
"@genesislcap/foundation-logger": "14.467.0-GNEC-1369.1",
|
|
65
|
+
"@genesislcap/foundation-utils": "14.467.0-GNEC-1369.1",
|
|
66
66
|
"@microsoft/fast-foundation": "2.50.0"
|
|
67
67
|
},
|
|
68
68
|
"repository": {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "1ee27e4efc07f42cb6fc95553493b781fe0c2dd3"
|
|
77
77
|
}
|