@genesislcap/ai-assistant 15.90.4 → 15.92.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.
@@ -103,6 +103,22 @@
103
103
  "package": "@genesislcap/foundation-ai"
104
104
  }
105
105
  },
106
+ {
107
+ "kind": "js",
108
+ "name": "OpenAIProvider",
109
+ "declaration": {
110
+ "name": "OpenAIProvider",
111
+ "package": "@genesislcap/foundation-ai"
112
+ }
113
+ },
114
+ {
115
+ "kind": "js",
116
+ "name": "OpenAITransport",
117
+ "declaration": {
118
+ "name": "OpenAITransport",
119
+ "package": "@genesislcap/foundation-ai"
120
+ }
121
+ },
106
122
  {
107
123
  "kind": "js",
108
124
  "name": "MutableAIProviderRegistry",
@@ -127,6 +143,14 @@
127
143
  "package": "@genesislcap/foundation-ai"
128
144
  }
129
145
  },
146
+ {
147
+ "kind": "js",
148
+ "name": "SUPPORTED_OPENAI_MODEL_IDS",
149
+ "declaration": {
150
+ "name": "SUPPORTED_OPENAI_MODEL_IDS",
151
+ "package": "@genesislcap/foundation-ai"
152
+ }
153
+ },
130
154
  {
131
155
  "kind": "js",
132
156
  "name": "DEFAULT_PROVIDER_REFUSED_MESSAGE",
@@ -287,6 +311,46 @@
287
311
  "package": "@genesislcap/foundation-ai"
288
312
  }
289
313
  },
314
+ {
315
+ "kind": "js",
316
+ "name": "OPENAI_CACHE_WRITE_12H_MULTIPLIER",
317
+ "declaration": {
318
+ "name": "OPENAI_CACHE_WRITE_12H_MULTIPLIER",
319
+ "package": "@genesislcap/foundation-ai"
320
+ }
321
+ },
322
+ {
323
+ "kind": "js",
324
+ "name": "OPENAI_CACHE_WRITE_30M_MULTIPLIER",
325
+ "declaration": {
326
+ "name": "OPENAI_CACHE_WRITE_30M_MULTIPLIER",
327
+ "package": "@genesislcap/foundation-ai"
328
+ }
329
+ },
330
+ {
331
+ "kind": "js",
332
+ "name": "OPENAI_LONG_CONTEXT_THRESHOLD",
333
+ "declaration": {
334
+ "name": "OPENAI_LONG_CONTEXT_THRESHOLD",
335
+ "package": "@genesislcap/foundation-ai"
336
+ }
337
+ },
338
+ {
339
+ "kind": "js",
340
+ "name": "openaiRatesFor",
341
+ "declaration": {
342
+ "name": "openaiRatesFor",
343
+ "package": "@genesislcap/foundation-ai"
344
+ }
345
+ },
346
+ {
347
+ "kind": "js",
348
+ "name": "openaiTokenCost",
349
+ "declaration": {
350
+ "name": "openaiTokenCost",
351
+ "package": "@genesislcap/foundation-ai"
352
+ }
353
+ },
290
354
  {
291
355
  "kind": "js",
292
356
  "name": "vendorOfModel",
@@ -487,6 +551,14 @@
487
551
  "package": "@genesislcap/foundation-ai"
488
552
  }
489
553
  },
554
+ {
555
+ "kind": "js",
556
+ "name": "OpenAIModelId",
557
+ "declaration": {
558
+ "name": "OpenAIModelId",
559
+ "package": "@genesislcap/foundation-ai"
560
+ }
561
+ },
490
562
  {
491
563
  "kind": "js",
492
564
  "name": "AITierId",
@@ -551,6 +623,14 @@
551
623
  "package": "@genesislcap/foundation-ai"
552
624
  }
553
625
  },
626
+ {
627
+ "kind": "js",
628
+ "name": "OpenAIUsageRecord",
629
+ "declaration": {
630
+ "name": "OpenAIUsageRecord",
631
+ "package": "@genesislcap/foundation-ai"
632
+ }
633
+ },
554
634
  {
555
635
  "kind": "js",
556
636
  "name": "TokenCost",
@@ -5211,158 +5291,389 @@
5211
5291
  },
5212
5292
  {
5213
5293
  "kind": "javascript-module",
5214
- "path": "src/components/flowing-waves-indicator.ts",
5294
+ "path": "src/config/config.ts",
5215
5295
  "declarations": [
5216
5296
  {
5217
- "kind": "class",
5218
- "description": "Animated \"flowing waves\" loading indicator — coloured organic waves (in the\nfour brand colours) whose bumps swell, shrink, merge and split across a line,\ntapering to nothing at both ends. Where the colours overlap they blend\nadditively toward white.\n\nVisual sibling of the dots loading indicator; interchangeable with the other\nloading styles for the \"assistant is working\" state.",
5219
- "name": "AiFlowingWavesIndicator",
5220
- "members": [
5221
- {
5222
- "kind": "field",
5223
- "name": "startTime",
5224
- "type": {
5225
- "text": "number | undefined"
5226
- },
5227
- "privacy": "private"
5228
- },
5229
- {
5230
- "kind": "field",
5231
- "name": "animFrame",
5232
- "type": {
5233
- "text": "number | undefined"
5234
- },
5235
- "privacy": "private"
5236
- },
5237
- {
5238
- "kind": "field",
5239
- "name": "bandPaths",
5240
- "type": {
5241
- "text": "SVGPathElement[] | undefined"
5242
- },
5243
- "privacy": "private"
5244
- },
5245
- {
5246
- "kind": "method",
5247
- "name": "tick",
5248
- "privacy": "private",
5249
- "parameters": [
5250
- {
5251
- "name": "now",
5252
- "optional": true,
5253
- "type": {
5254
- "text": "number"
5255
- }
5256
- }
5257
- ]
5258
- },
5259
- {
5260
- "kind": "method",
5261
- "name": "buildBand",
5262
- "privacy": "private",
5263
- "static": true,
5264
- "return": {
5265
- "type": {
5266
- "text": "string"
5267
- }
5268
- },
5269
- "parameters": [
5270
- {
5271
- "name": "cfg",
5272
- "type": {
5273
- "text": "BandConfig"
5274
- }
5275
- },
5276
- {
5277
- "name": "frame",
5278
- "type": {
5279
- "text": "number"
5280
- }
5281
- }
5282
- ],
5283
- "description": "Trace one band for the given frame: a baseline-plus-harmonics half-thickness\nprofile, clamped at 0 (so the band pinches to nothing between bumps) and\ntapered to 0 at both ends."
5284
- }
5285
- ],
5286
- "superclass": {
5287
- "name": "GenesisElement",
5288
- "package": "@genesislcap/web-core"
5289
- },
5290
- "tagName": "ai-flowing-waves-indicator",
5291
- "customElement": true
5297
+ "kind": "function",
5298
+ "name": "defineAgent",
5299
+ "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5292
5300
  }
5293
5301
  ],
5294
5302
  "exports": [
5295
5303
  {
5296
5304
  "kind": "js",
5297
- "name": "AiFlowingWavesIndicator",
5305
+ "name": "CachePolicy",
5298
5306
  "declaration": {
5299
- "name": "AiFlowingWavesIndicator",
5300
- "module": "src/components/flowing-waves-indicator.ts"
5307
+ "name": "CachePolicy",
5308
+ "module": "src/config/config.ts"
5301
5309
  }
5302
5310
  },
5303
5311
  {
5304
- "kind": "custom-element-definition",
5305
- "name": "ai-flowing-waves-indicator",
5312
+ "kind": "js",
5313
+ "name": "ChatFallback",
5306
5314
  "declaration": {
5307
- "name": "AiFlowingWavesIndicator",
5308
- "module": "src/components/flowing-waves-indicator.ts"
5315
+ "name": "ChatFallback",
5316
+ "module": "src/config/config.ts"
5317
+ }
5318
+ },
5319
+ {
5320
+ "kind": "js",
5321
+ "name": "ChatInputDuringExecutionMode",
5322
+ "declaration": {
5323
+ "name": "ChatInputDuringExecutionMode",
5324
+ "module": "src/config/config.ts"
5325
+ }
5326
+ },
5327
+ {
5328
+ "kind": "js",
5329
+ "name": "ChatThinkingPolicy",
5330
+ "declaration": {
5331
+ "name": "ChatThinkingPolicy",
5332
+ "module": "src/config/config.ts"
5333
+ }
5334
+ },
5335
+ {
5336
+ "kind": "js",
5337
+ "name": "ChatToolChoice",
5338
+ "declaration": {
5339
+ "name": "ChatToolChoice",
5340
+ "module": "src/config/config.ts"
5341
+ }
5342
+ },
5343
+ {
5344
+ "kind": "js",
5345
+ "name": "defineAgent",
5346
+ "declaration": {
5347
+ "name": "defineAgent",
5348
+ "module": "src/config/config.ts"
5309
5349
  }
5310
5350
  }
5311
5351
  ]
5312
5352
  },
5313
5353
  {
5314
5354
  "kind": "javascript-module",
5315
- "path": "src/components/halo-overlay.ts",
5355
+ "path": "src/config/define-stateful-agent.ts",
5316
5356
  "declarations": [
5317
5357
  {
5318
- "kind": "class",
5319
- "description": "Animated halo overlay — rotating conic-gradient border with an inward glow.\n\nDrop inside any `position: relative; overflow: hidden` container and toggle\nthe `active` attribute to show/hide the effect.",
5320
- "name": "AiHaloOverlay",
5321
- "members": [
5322
- {
5323
- "kind": "field",
5324
- "name": "active",
5325
- "type": {
5326
- "text": "boolean"
5327
- },
5328
- "default": "false"
5329
- },
5358
+ "kind": "function",
5359
+ "name": "restoreMachine",
5360
+ "return": {
5361
+ "type": {
5362
+ "text": "void"
5363
+ }
5364
+ },
5365
+ "parameters": [
5330
5366
  {
5331
- "kind": "field",
5332
- "name": "speed",
5367
+ "name": "machine",
5333
5368
  "type": {
5334
- "text": "number"
5369
+ "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5335
5370
  },
5336
- "default": "1.5",
5337
- "description": "Rotation speed in degrees per frame. Default: 1.5 (≈ 4 s per full revolution at 60 fps)."
5371
+ "description": "the machine to restore (already constructed/started)."
5338
5372
  },
5339
5373
  {
5340
- "kind": "field",
5341
- "name": "direction",
5374
+ "name": "restored",
5342
5375
  "type": {
5343
- "text": "'cw' | 'ccw'"
5376
+ "text": "unknown"
5344
5377
  },
5345
- "default": "'cw'",
5346
- "description": "Rotation direction. Default: 'cw' (clockwise)."
5378
+ "description": "the agent's serialized image (`ctx.restored` in `init`)."
5347
5379
  },
5348
5380
  {
5349
- "kind": "field",
5350
- "name": "borderSize",
5351
- "type": {
5352
- "text": "number"
5353
- },
5354
- "default": "3",
5355
- "description": "Border thickness in px. Default: 3."
5356
- },
5381
+ "name": "key",
5382
+ "default": "'machine'",
5383
+ "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5384
+ }
5385
+ ],
5386
+ "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5387
+ },
5388
+ {
5389
+ "kind": "function",
5390
+ "name": "defineStatefulAgent",
5391
+ "return": {
5392
+ "type": {
5393
+ "text": "AgentConfig"
5394
+ }
5395
+ },
5396
+ "parameters": [
5357
5397
  {
5358
- "kind": "field",
5359
- "name": "glowOpacity",
5398
+ "name": "opts",
5360
5399
  "type": {
5361
- "text": "number"
5362
- },
5363
- "default": "0.35",
5364
- "description": "Glow layer opacity (0–1). Default: 0.35."
5365
- },
5400
+ "text": "StatefulAgentInit<S>"
5401
+ }
5402
+ }
5403
+ ],
5404
+ "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5405
+ },
5406
+ {
5407
+ "kind": "function",
5408
+ "name": "defineAutopilot",
5409
+ "return": {
5410
+ "type": {
5411
+ "text": "AutopilotConfig<S>"
5412
+ }
5413
+ },
5414
+ "parameters": [
5415
+ {
5416
+ "name": "config",
5417
+ "type": {
5418
+ "text": "AutopilotConfig<S>"
5419
+ }
5420
+ }
5421
+ ],
5422
+ "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5423
+ }
5424
+ ],
5425
+ "exports": [
5426
+ {
5427
+ "kind": "js",
5428
+ "name": "restoreMachine",
5429
+ "declaration": {
5430
+ "name": "restoreMachine",
5431
+ "module": "src/config/define-stateful-agent.ts"
5432
+ }
5433
+ },
5434
+ {
5435
+ "kind": "js",
5436
+ "name": "defineStatefulAgent",
5437
+ "declaration": {
5438
+ "name": "defineStatefulAgent",
5439
+ "module": "src/config/define-stateful-agent.ts"
5440
+ }
5441
+ },
5442
+ {
5443
+ "kind": "js",
5444
+ "name": "defineAutopilot",
5445
+ "declaration": {
5446
+ "name": "defineAutopilot",
5447
+ "module": "src/config/define-stateful-agent.ts"
5448
+ }
5449
+ }
5450
+ ]
5451
+ },
5452
+ {
5453
+ "kind": "javascript-module",
5454
+ "path": "src/config/fallback-agents.ts",
5455
+ "declarations": [
5456
+ {
5457
+ "kind": "variable",
5458
+ "name": "friendlyFallbackAgent",
5459
+ "type": {
5460
+ "text": "FallbackAgentConfig"
5461
+ },
5462
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5463
+ "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5464
+ },
5465
+ {
5466
+ "kind": "variable",
5467
+ "name": "strictFallbackAgent",
5468
+ "type": {
5469
+ "text": "FallbackAgentConfig"
5470
+ },
5471
+ "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5472
+ "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5473
+ }
5474
+ ],
5475
+ "exports": [
5476
+ {
5477
+ "kind": "js",
5478
+ "name": "friendlyFallbackAgent",
5479
+ "declaration": {
5480
+ "name": "friendlyFallbackAgent",
5481
+ "module": "src/config/fallback-agents.ts"
5482
+ }
5483
+ },
5484
+ {
5485
+ "kind": "js",
5486
+ "name": "strictFallbackAgent",
5487
+ "declaration": {
5488
+ "name": "strictFallbackAgent",
5489
+ "module": "src/config/fallback-agents.ts"
5490
+ }
5491
+ }
5492
+ ]
5493
+ },
5494
+ {
5495
+ "kind": "javascript-module",
5496
+ "path": "src/config/index.ts",
5497
+ "declarations": [],
5498
+ "exports": [
5499
+ {
5500
+ "kind": "js",
5501
+ "name": "*",
5502
+ "declaration": {
5503
+ "name": "*",
5504
+ "package": "./config"
5505
+ }
5506
+ },
5507
+ {
5508
+ "kind": "js",
5509
+ "name": "*",
5510
+ "declaration": {
5511
+ "name": "*",
5512
+ "package": "./fallback-agents"
5513
+ }
5514
+ }
5515
+ ]
5516
+ },
5517
+ {
5518
+ "kind": "javascript-module",
5519
+ "path": "src/config/validate-providers.ts",
5520
+ "declarations": [],
5521
+ "exports": []
5522
+ },
5523
+ {
5524
+ "kind": "javascript-module",
5525
+ "path": "src/components/flowing-waves-indicator.ts",
5526
+ "declarations": [
5527
+ {
5528
+ "kind": "class",
5529
+ "description": "Animated \"flowing waves\" loading indicator — coloured organic waves (in the\nfour brand colours) whose bumps swell, shrink, merge and split across a line,\ntapering to nothing at both ends. Where the colours overlap they blend\nadditively toward white.\n\nVisual sibling of the dots loading indicator; interchangeable with the other\nloading styles for the \"assistant is working\" state.",
5530
+ "name": "AiFlowingWavesIndicator",
5531
+ "members": [
5532
+ {
5533
+ "kind": "field",
5534
+ "name": "startTime",
5535
+ "type": {
5536
+ "text": "number | undefined"
5537
+ },
5538
+ "privacy": "private"
5539
+ },
5540
+ {
5541
+ "kind": "field",
5542
+ "name": "animFrame",
5543
+ "type": {
5544
+ "text": "number | undefined"
5545
+ },
5546
+ "privacy": "private"
5547
+ },
5548
+ {
5549
+ "kind": "field",
5550
+ "name": "bandPaths",
5551
+ "type": {
5552
+ "text": "SVGPathElement[] | undefined"
5553
+ },
5554
+ "privacy": "private"
5555
+ },
5556
+ {
5557
+ "kind": "method",
5558
+ "name": "tick",
5559
+ "privacy": "private",
5560
+ "parameters": [
5561
+ {
5562
+ "name": "now",
5563
+ "optional": true,
5564
+ "type": {
5565
+ "text": "number"
5566
+ }
5567
+ }
5568
+ ]
5569
+ },
5570
+ {
5571
+ "kind": "method",
5572
+ "name": "buildBand",
5573
+ "privacy": "private",
5574
+ "static": true,
5575
+ "return": {
5576
+ "type": {
5577
+ "text": "string"
5578
+ }
5579
+ },
5580
+ "parameters": [
5581
+ {
5582
+ "name": "cfg",
5583
+ "type": {
5584
+ "text": "BandConfig"
5585
+ }
5586
+ },
5587
+ {
5588
+ "name": "frame",
5589
+ "type": {
5590
+ "text": "number"
5591
+ }
5592
+ }
5593
+ ],
5594
+ "description": "Trace one band for the given frame: a baseline-plus-harmonics half-thickness\nprofile, clamped at 0 (so the band pinches to nothing between bumps) and\ntapered to 0 at both ends."
5595
+ }
5596
+ ],
5597
+ "superclass": {
5598
+ "name": "GenesisElement",
5599
+ "package": "@genesislcap/web-core"
5600
+ },
5601
+ "tagName": "ai-flowing-waves-indicator",
5602
+ "customElement": true
5603
+ }
5604
+ ],
5605
+ "exports": [
5606
+ {
5607
+ "kind": "js",
5608
+ "name": "AiFlowingWavesIndicator",
5609
+ "declaration": {
5610
+ "name": "AiFlowingWavesIndicator",
5611
+ "module": "src/components/flowing-waves-indicator.ts"
5612
+ }
5613
+ },
5614
+ {
5615
+ "kind": "custom-element-definition",
5616
+ "name": "ai-flowing-waves-indicator",
5617
+ "declaration": {
5618
+ "name": "AiFlowingWavesIndicator",
5619
+ "module": "src/components/flowing-waves-indicator.ts"
5620
+ }
5621
+ }
5622
+ ]
5623
+ },
5624
+ {
5625
+ "kind": "javascript-module",
5626
+ "path": "src/components/halo-overlay.ts",
5627
+ "declarations": [
5628
+ {
5629
+ "kind": "class",
5630
+ "description": "Animated halo overlay — rotating conic-gradient border with an inward glow.\n\nDrop inside any `position: relative; overflow: hidden` container and toggle\nthe `active` attribute to show/hide the effect.",
5631
+ "name": "AiHaloOverlay",
5632
+ "members": [
5633
+ {
5634
+ "kind": "field",
5635
+ "name": "active",
5636
+ "type": {
5637
+ "text": "boolean"
5638
+ },
5639
+ "default": "false"
5640
+ },
5641
+ {
5642
+ "kind": "field",
5643
+ "name": "speed",
5644
+ "type": {
5645
+ "text": "number"
5646
+ },
5647
+ "default": "1.5",
5648
+ "description": "Rotation speed in degrees per frame. Default: 1.5 (≈ 4 s per full revolution at 60 fps)."
5649
+ },
5650
+ {
5651
+ "kind": "field",
5652
+ "name": "direction",
5653
+ "type": {
5654
+ "text": "'cw' | 'ccw'"
5655
+ },
5656
+ "default": "'cw'",
5657
+ "description": "Rotation direction. Default: 'cw' (clockwise)."
5658
+ },
5659
+ {
5660
+ "kind": "field",
5661
+ "name": "borderSize",
5662
+ "type": {
5663
+ "text": "number"
5664
+ },
5665
+ "default": "3",
5666
+ "description": "Border thickness in px. Default: 3."
5667
+ },
5668
+ {
5669
+ "kind": "field",
5670
+ "name": "glowOpacity",
5671
+ "type": {
5672
+ "text": "number"
5673
+ },
5674
+ "default": "0.35",
5675
+ "description": "Glow layer opacity (0–1). Default: 0.35."
5676
+ },
5366
5677
  {
5367
5678
  "kind": "field",
5368
5679
  "name": "glowSpread",
@@ -5733,237 +6044,6 @@
5733
6044
  }
5734
6045
  ]
5735
6046
  },
5736
- {
5737
- "kind": "javascript-module",
5738
- "path": "src/config/config.ts",
5739
- "declarations": [
5740
- {
5741
- "kind": "function",
5742
- "name": "defineAgent",
5743
- "description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
5744
- }
5745
- ],
5746
- "exports": [
5747
- {
5748
- "kind": "js",
5749
- "name": "CachePolicy",
5750
- "declaration": {
5751
- "name": "CachePolicy",
5752
- "module": "src/config/config.ts"
5753
- }
5754
- },
5755
- {
5756
- "kind": "js",
5757
- "name": "ChatFallback",
5758
- "declaration": {
5759
- "name": "ChatFallback",
5760
- "module": "src/config/config.ts"
5761
- }
5762
- },
5763
- {
5764
- "kind": "js",
5765
- "name": "ChatInputDuringExecutionMode",
5766
- "declaration": {
5767
- "name": "ChatInputDuringExecutionMode",
5768
- "module": "src/config/config.ts"
5769
- }
5770
- },
5771
- {
5772
- "kind": "js",
5773
- "name": "ChatThinkingPolicy",
5774
- "declaration": {
5775
- "name": "ChatThinkingPolicy",
5776
- "module": "src/config/config.ts"
5777
- }
5778
- },
5779
- {
5780
- "kind": "js",
5781
- "name": "ChatToolChoice",
5782
- "declaration": {
5783
- "name": "ChatToolChoice",
5784
- "module": "src/config/config.ts"
5785
- }
5786
- },
5787
- {
5788
- "kind": "js",
5789
- "name": "defineAgent",
5790
- "declaration": {
5791
- "name": "defineAgent",
5792
- "module": "src/config/config.ts"
5793
- }
5794
- }
5795
- ]
5796
- },
5797
- {
5798
- "kind": "javascript-module",
5799
- "path": "src/config/define-stateful-agent.ts",
5800
- "declarations": [
5801
- {
5802
- "kind": "function",
5803
- "name": "restoreMachine",
5804
- "return": {
5805
- "type": {
5806
- "text": "void"
5807
- }
5808
- },
5809
- "parameters": [
5810
- {
5811
- "name": "machine",
5812
- "type": {
5813
- "text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
5814
- },
5815
- "description": "the machine to restore (already constructed/started)."
5816
- },
5817
- {
5818
- "name": "restored",
5819
- "type": {
5820
- "text": "unknown"
5821
- },
5822
- "description": "the agent's serialized image (`ctx.restored` in `init`)."
5823
- },
5824
- {
5825
- "name": "key",
5826
- "default": "'machine'",
5827
- "description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
5828
- }
5829
- ],
5830
- "description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
5831
- },
5832
- {
5833
- "kind": "function",
5834
- "name": "defineStatefulAgent",
5835
- "return": {
5836
- "type": {
5837
- "text": "AgentConfig"
5838
- }
5839
- },
5840
- "parameters": [
5841
- {
5842
- "name": "opts",
5843
- "type": {
5844
- "text": "StatefulAgentInit<S>"
5845
- }
5846
- }
5847
- ],
5848
- "description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
5849
- },
5850
- {
5851
- "kind": "function",
5852
- "name": "defineAutopilot",
5853
- "return": {
5854
- "type": {
5855
- "text": "AutopilotConfig<S>"
5856
- }
5857
- },
5858
- "parameters": [
5859
- {
5860
- "name": "config",
5861
- "type": {
5862
- "text": "AutopilotConfig<S>"
5863
- }
5864
- }
5865
- ],
5866
- "description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
5867
- }
5868
- ],
5869
- "exports": [
5870
- {
5871
- "kind": "js",
5872
- "name": "restoreMachine",
5873
- "declaration": {
5874
- "name": "restoreMachine",
5875
- "module": "src/config/define-stateful-agent.ts"
5876
- }
5877
- },
5878
- {
5879
- "kind": "js",
5880
- "name": "defineStatefulAgent",
5881
- "declaration": {
5882
- "name": "defineStatefulAgent",
5883
- "module": "src/config/define-stateful-agent.ts"
5884
- }
5885
- },
5886
- {
5887
- "kind": "js",
5888
- "name": "defineAutopilot",
5889
- "declaration": {
5890
- "name": "defineAutopilot",
5891
- "module": "src/config/define-stateful-agent.ts"
5892
- }
5893
- }
5894
- ]
5895
- },
5896
- {
5897
- "kind": "javascript-module",
5898
- "path": "src/config/fallback-agents.ts",
5899
- "declarations": [
5900
- {
5901
- "kind": "variable",
5902
- "name": "friendlyFallbackAgent",
5903
- "type": {
5904
- "text": "FallbackAgentConfig"
5905
- },
5906
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
5907
- "description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
5908
- },
5909
- {
5910
- "kind": "variable",
5911
- "name": "strictFallbackAgent",
5912
- "type": {
5913
- "text": "FallbackAgentConfig"
5914
- },
5915
- "default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
5916
- "description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
5917
- }
5918
- ],
5919
- "exports": [
5920
- {
5921
- "kind": "js",
5922
- "name": "friendlyFallbackAgent",
5923
- "declaration": {
5924
- "name": "friendlyFallbackAgent",
5925
- "module": "src/config/fallback-agents.ts"
5926
- }
5927
- },
5928
- {
5929
- "kind": "js",
5930
- "name": "strictFallbackAgent",
5931
- "declaration": {
5932
- "name": "strictFallbackAgent",
5933
- "module": "src/config/fallback-agents.ts"
5934
- }
5935
- }
5936
- ]
5937
- },
5938
- {
5939
- "kind": "javascript-module",
5940
- "path": "src/config/index.ts",
5941
- "declarations": [],
5942
- "exports": [
5943
- {
5944
- "kind": "js",
5945
- "name": "*",
5946
- "declaration": {
5947
- "name": "*",
5948
- "package": "./config"
5949
- }
5950
- },
5951
- {
5952
- "kind": "js",
5953
- "name": "*",
5954
- "declaration": {
5955
- "name": "*",
5956
- "package": "./fallback-agents"
5957
- }
5958
- }
5959
- ]
5960
- },
5961
- {
5962
- "kind": "javascript-module",
5963
- "path": "src/config/validate-providers.ts",
5964
- "declarations": [],
5965
- "exports": []
5966
- },
5967
6047
  {
5968
6048
  "kind": "javascript-module",
5969
6049
  "path": "src/genesis/calendar.ts",