@economic/agents 0.0.1-alpha.6 → 0.0.1-alpha.7

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.
Files changed (2) hide show
  1. package/dist/index.d.mts +19 -1
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -487,6 +487,24 @@ declare abstract class AIChatAgent<Env extends Cloudflare.Env = Cloudflare.Env>
487
487
  onChatMessage(onFinish: StreamTextOnFinishCallback<ToolSet>, options?: OnChatMessageOptions): Promise<Response | undefined>;
488
488
  }
489
489
  //#endregion
490
+ //#region src/agents/chat/types.d.ts
491
+ /**
492
+ * The shape of experimental_context passed to tool execute functions.
493
+ *
494
+ * Cast experimental_context to this type to access forwarded request headers:
495
+ *
496
+ * ```typescript
497
+ * import type { AgentToolContext } from '@economic/agents';
498
+ *
499
+ * execute: async (args, { experimental_context }) => {
500
+ * const { authorization } = experimental_context as AgentToolContext;
501
+ * }
502
+ * ```
503
+ */
504
+ interface AgentToolContext {
505
+ headers: Record<string, string>;
506
+ }
507
+ //#endregion
490
508
  //#region src/features/skills/index.d.ts
491
509
  /**
492
510
  * Creates a skill loading system for use with the Vercel AI SDK.
@@ -606,4 +624,4 @@ declare function compactMessages(messages: UIMessage[], model: LanguageModel, ta
606
624
  */
607
625
  declare function compactIfNeeded(messages: UIMessage[], model: LanguageModel | undefined, tailSize: number): Promise<UIMessage[]>;
608
626
  //#endregion
609
- export { AIChatAgent, AIChatAgentBase, COMPACT_TOKEN_THRESHOLD, type Skill, type SkillContext, type SkillsConfig, type SkillsResult, compactIfNeeded, compactMessages, createSkills, estimateMessagesTokens, filterEphemeralMessages, injectGuidance, withSkills };
627
+ export { AIChatAgent, AIChatAgentBase, type AgentToolContext, COMPACT_TOKEN_THRESHOLD, type Skill, type SkillContext, type SkillsConfig, type SkillsResult, compactIfNeeded, compactMessages, createSkills, estimateMessagesTokens, filterEphemeralMessages, injectGuidance, withSkills };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/agents",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.7",
4
4
  "description": "A starter for creating a TypeScript package.",
5
5
  "homepage": "https://github.com/author/library#readme",
6
6
  "bugs": {