@effect-uai/core 0.19.0-dev-20261110065930 → 0.19.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.
Files changed (34) hide show
  1. package/dist/{Items-Bvx8s9QH.d.mts → Items-WuoPxBdV.d.mts} +4 -4
  2. package/dist/{Items-Bvx8s9QH.d.mts.map → Items-WuoPxBdV.d.mts.map} +1 -1
  3. package/dist/{Tool-Bkryw6-h.d.mts → Tool-BowQ7nAJ.d.mts} +2 -2
  4. package/dist/{Tool-Bkryw6-h.d.mts.map → Tool-BowQ7nAJ.d.mts.map} +1 -1
  5. package/dist/{ToolOutput-BNTIQgGB.d.mts → ToolOutput-Be0DKBO3.d.mts} +2 -2
  6. package/dist/{ToolOutput-BNTIQgGB.d.mts.map → ToolOutput-Be0DKBO3.d.mts.map} +1 -1
  7. package/dist/{Toolkit-D2VGeD5R.d.mts → Toolkit-DPmXvAcr.d.mts} +4 -4
  8. package/dist/{Toolkit-D2VGeD5R.d.mts.map → Toolkit-DPmXvAcr.d.mts.map} +1 -1
  9. package/dist/browser/BrowserTool.d.mts +1 -1
  10. package/dist/capabilities/Capabilities.d.mts +1 -1
  11. package/dist/domain/Items.d.mts +1 -1
  12. package/dist/domain/Realtime.d.mts +2 -2
  13. package/dist/domain/Research.d.mts +1 -1
  14. package/dist/domain/Turn.d.mts +1 -1
  15. package/dist/index.d.mts +4 -4
  16. package/dist/language-model/LanguageModel.d.mts +2 -2
  17. package/dist/observability/Metrics.d.mts +1 -1
  18. package/dist/testing/MockProvider.d.mts +1 -1
  19. package/dist/tool/HistoryCheck.d.mts +1 -1
  20. package/dist/tool/Tool.d.mts +1 -1
  21. package/dist/tool/ToolDecision.d.mts +1 -1
  22. package/dist/tool/ToolOutput.d.mts +1 -1
  23. package/dist/tool/Toolkit.d.mts +1 -1
  24. package/dist/web-read/WebReadTool.d.mts +1 -1
  25. package/dist/web-read/WebReadTool.d.mts.map +1 -1
  26. package/dist/web-read/WebReadTool.mjs +5 -2
  27. package/dist/web-read/WebReadTool.mjs.map +1 -1
  28. package/dist/web-search/WebSearchTool.d.mts +1 -1
  29. package/dist/web-search/WebSearchTool.d.mts.map +1 -1
  30. package/dist/web-search/WebSearchTool.mjs +5 -2
  31. package/dist/web-search/WebSearchTool.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/src/web-read/WebReadTool.ts +1 -1
  34. package/src/web-search/WebSearchTool.ts +1 -1
@@ -518,13 +518,13 @@ declare const isToolCallOutput: <I>(input: I) => input is I & {
518
518
  } | {
519
519
  readonly type: "input_image";
520
520
  readonly source: ImageSource;
521
+ } | {
522
+ readonly type: "input_json";
523
+ readonly value: Schema.Json;
521
524
  } | {
522
525
  readonly type: "input_file";
523
526
  readonly source: FileSource;
524
527
  readonly filename?: string;
525
- } | {
526
- readonly type: "input_json";
527
- readonly value: Schema.Json;
528
528
  })[];
529
529
  readonly isError?: boolean;
530
530
  readonly providerData?: unknown;
@@ -582,4 +582,4 @@ declare const image: (source: ImageSource) => InputImage;
582
582
  declare const file: (source: FileSource, filename?: string) => InputFile;
583
583
  //#endregion
584
584
  export { isFileCitation as A, isRefusal as B, ToolOutputContent as C, file as D, assistantText as E, isInputText as F, systemText as G, isToolCallOutput as H, isMessage as I, userText as J, text as K, isOutputImage as L, isInputFile as M, isInputImage as N, image as O, isInputJson as P, isOutputText as R, ToolCallOutput as S, Usage as T, isUrlCitation as U, isToolCall as V, json as W, Reasoning as _, FilePath as a, StopReason as b, InputImage as c, InputTokensDetails as d, Items_d_exports as f, OutputTokensDetails as g, OutputText as h, FileCitation as i, isFilePath as j, isContainerFileCitation as k, InputJson as l, OutputImage as m, ContainerFileCitation as n, HistoryItem as o, Message as p, toolCallOutput as q, ContentBlock as r, InputFile as s, Annotation as t, InputText as u, Refusal as v, UrlCitation as w, ToolCall as x, Role as y, isReasoning as z };
585
- //# sourceMappingURL=Items-Bvx8s9QH.d.mts.map
585
+ //# sourceMappingURL=Items-WuoPxBdV.d.m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BAAsB"}
@@ -1,4 +1,4 @@
1
- import { x as ToolCall } from "./Items-Bvx8s9QH.mjs";
1
+ import { x as ToolCall } from "./Items-WuoPxBdV.mjs";
2
2
  import { Effect, Schema, Stream } from "effect";
3
3
  import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
4
4
  declare namespace Tool_d_exports {
@@ -203,4 +203,4 @@ declare const decodeCallInput: <Input>(tool: DecodableTool<Input>, call: ToolCal
203
203
  declare const decodeArgs: <Input>(tool: DecodableTool<Input>, call: ToolCall) => Effect.Effect<Input, ToolError | ToolValidationError>;
204
204
  //#endregion
205
205
  export { fromStandardSchema as A, withName as B, WithFailures as C, descriptorsOf as D, decodeCallInput as E, provider as F, providerToolsOf as I, toDescriptors as L, isStreamed as M, make as N, fail as O, noInput as P, toStream as R, Tool_d_exports as S, decodeArgs as T, withRun as V, ToolInputSchema as _, Declared as a, ToolUnhandled as b, InputSchema as c, Tool as d, ToolDescriptor as f, ToolFailure as g, ToolFailed as h, AnyTool as i, isProviderTool as j, fromEffectSchema as k, ProviderTool as l, ToolError as m, AnyDescribed as n, DecodableTool as o, ToolE as p, AnyLocalTool as r, DecodeResult as s, AnyDeclared as t, Run as u, ToolOutput as v, declare as w, ToolValidationError as x, ToolR as y, withFailures as z };
206
- //# sourceMappingURL=Tool-Bkryw6-h.d.mts.map
206
+ //# sourceMappingURL=Tool-BowQ7nAJ.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tool-Bkryw6-h.d.mts","names":[],"sources":["../src/tool/Tool.ts"],"mappings":";;;;;;;;;;;;cAIa,kBAAkB;;;;;;;;;;cAoBlB,4BAA4B;;;;;;;;cAY5B,mBAAmB;;cAMnB,OAAI,oBAAsB,OAAO,cAAc;;;;;;KAYhD,gBAAgB,mBAAmB,0BAA0B,SACvE,8BAA8B;;KAGpB,YAAY,SAAS,OAAO,MAAM,0BAA0B,gBAAgB;;cAG3E,mBAAoB,UAAU,OAAO,6BAA2B,QACnE,MACP,IA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YAAU,QAAQ;;cAI1C,kBAAe,UAChB,SAAS,eAAe,cACjC,cAAc;;cAIJ,gBAAa,OAAW,cAAc,aAAW,cAAc;;cAc/D,gBAAa,UACd,SAAS,eAAe,cACjC,cAAc;KAOL,aAAa;WACV;WAAqB,OAAO;;WAC5B;;WACA;WAA0B,QAAQ,cAAc,iBAAiB;;;;;;cAUnE,kBAAmB,OAAK,MAC7B,cAAc,QAAM,MACpB,aACL,OAAO,OAAO,aAAa;;;;;cA2BjB,aAAc,OAAK,MACxB,cAAc,QAAM,MACpB,aACL,OAAO,OAAO,OAAO,YAAY"}
@@ -1,6 +1,6 @@
1
1
  import { i as FileSource, r as FileMimeType } from "./File-B923KvZ9.mjs";
2
2
  import { i as ImageMimeType, o as ImageSource } from "./Image-Bzc1H_UK.mjs";
3
- import { C as ToolOutputContent, S as ToolCallOutput, l as InputJson, u as InputText, x as ToolCall } from "./Items-Bvx8s9QH.mjs";
3
+ import { C as ToolOutputContent, S as ToolCallOutput, l as InputJson, u as InputText, x as ToolCall } from "./Items-WuoPxBdV.mjs";
4
4
  import { a as Value, n as File, r as Image } from "./Content-D_Qfn8Ja.mjs";
5
5
  import { Effect, Option, Schema } from "effect";
6
6
  declare namespace ToolOutput_d_exports {
@@ -148,4 +148,4 @@ type CoreError = RunError | Cancelled;
148
148
  declare const CoreError: Schema.Union<readonly [typeof InputInvalid, typeof OutputInvalid, typeof UnknownTool, typeof Cancelled]>;
149
149
  //#endregion
150
150
  export { success as _, PartJson as a, valueParts as b, UnknownTool as c, failure as d, isTextual as f, single as g, parts as h, OutputInvalid as i, ValueParts as l, partText as m, CoreError as n, RunError as o, make as p, InputInvalid as r, ToolOutput_d_exports as s, Cancelled as t, encoded as u, text as v, value as y };
151
- //# sourceMappingURL=ToolOutput-BNTIQgGB.d.mts.map
151
+ //# sourceMappingURL=ToolOutput-Be0DKBO3.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolOutput-BNTIQgGB.d.mts","names":[],"sources":["../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cACzC,UAAQ,OAAA,uBAAA,qBAAA,sBAAA;;KAGT,YAAY,WAAW;cACtB,WAAS,OAAA,uBAAA,qBAAA,sBAAA,oBAAA"}
@@ -1,9 +1,9 @@
1
- import { S as ToolCallOutput, o as HistoryItem, x as ToolCall } from "./Items-Bvx8s9QH.mjs";
2
- import { b as ToolUnhandled, d as Tool, f as ToolDescriptor, g as ToolFailure, h as ToolFailed, i as AnyTool, l as ProviderTool, v as ToolOutput, y as ToolR } from "./Tool-Bkryw6-h.mjs";
1
+ import { S as ToolCallOutput, o as HistoryItem, x as ToolCall } from "./Items-WuoPxBdV.mjs";
2
+ import { b as ToolUnhandled, d as Tool, f as ToolDescriptor, g as ToolFailure, h as ToolFailed, i as AnyTool, l as ProviderTool, v as ToolOutput, y as ToolR } from "./Tool-BowQ7nAJ.mjs";
3
3
  import { Turn } from "./domain/Turn.mjs";
4
4
  import { r as Step } from "./Loop-CeA0AelN.mjs";
5
5
  import { r as ToolEvent, t as Output } from "./ToolEvent-9inLx5cI.mjs";
6
- import { i as OutputInvalid, n as CoreError, o as RunError, r as InputInvalid } from "./ToolOutput-BNTIQgGB.mjs";
6
+ import { i as OutputInvalid, n as CoreError, o as RunError, r as InputInvalid } from "./ToolOutput-Be0DKBO3.mjs";
7
7
  import { Cause, Effect, Result, Schema, Stream } from "effect";
8
8
  import { StandardSchemaV1 } from "@standard-schema/spec";
9
9
  declare namespace Toolkit_d_exports {
@@ -209,4 +209,4 @@ declare const next: <S extends {
209
209
  }, E | Schema.SchemaError, R>;
210
210
  //#endregion
211
211
  export { namespace as A, decode as C, isOutcome as D, fromArray as E, withFailures as F, wrap as I, output as M, run as N, make as O, split as P, continueWith as S, descriptors as T, UniqueTools as _, Handler as a, complete as b, Outcome as c, Toolkit as d, ToolkitE as f, UndeclaredFailure as g, Toolkit_d_exports as h, ExecuteOptions as i, next as j, makeNamespaced as k, Split as l, ToolkitR as m, DuplicateToolName as n, Middleware as o, ToolkitFailure as p, Event as r, NoDuplicateNames as s, DeclaredCall as t, ToolMap as u, appendResults as v, describeFailures as w, compose as x, close as y };
212
- //# sourceMappingURL=Toolkit-D2VGeD5R.d.mts.map
212
+ //# sourceMappingURL=Toolkit-DPmXvAcr.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toolkit-D2VGeD5R.d.mts","names":[],"sources":["../src/tool/Toolkit.ts"],"mappings":";;;;;;;;;;;KAiDY,UAAU,eAAe;KAEzB,QAAQ,cAAc,UAAU,WAAW;KAElD,QAAQ,cAAc,cAAc,eAAe,KAAK,iBAAiB,YAAY;;cAS7E,aAAc,cAAc,cAAc,aAAQ,OACnD,YAAY,WACrB,QAAQ,QAAQ;;cAGN,YAAS,OAAW,cAAc,aAAW;cAE7C,cAAW,SAAa,YAAU,cAAc;KAIxD,OAAO,UAAU,WAAW,QAAQ,QAAQ;WAAe;;;KAGpD,SAAS,UAAU,WAAW,gBAAgB,YAAY,MAAM,QAAQ;;KAGxE,SAAS,UAAU,WAAW,gBAAgB,YAAY,cAAc,QAAQ;;KAGhF,MAAM,UAAU,YACvB,OAAO,kBAAiB,KACrB,UAAU,WAAW,cAAc,SAAS,eAC1C,UAAoB,GAAG,GAAG,IAAI,6BAGpC,sBAAgC;KAM/B,cACH,cAAc,cAAc,UAC5B,+BACE,8BACI,aAAa,kBACV,aAAa,cAAc,YAElC,qBAAqB,OACnB,eACA,cAAc,MAAM,OAAO;KAG5B,mBAAmB;WACb,iCAAiC;;KAGhC,iBAAiB,cAAc,cAAc,aACvD,cAAc,oCAGZ,mBAAmB,cAAc;KAEzB,YAAY,cAAc,cAAc,YAAY,QAAQ,iBAAiB;KAGpF,oBACH,aAAa,cAAc,UAC3B,+BACE,6BAA6B,aAAa,kBAAkB,aAAa,cAAc,iCAClE,OACnB,oBAAoB,MAAM,QAC1B,cAAc,eAAe,sBAC3B,oBAAoB,MAAM,cAAc,kBACxC,cAAc,eAAe;KAGhC,wBAAwB,aAAa,cAAc,aACtD,oBAAoB,mCAGlB,mBAAmB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;;;;;;;GA6C0B,IAAA,OAAA,aAAA"}
@@ -1,6 +1,6 @@
1
1
  import { BrowserError } from "./BrowserError.mjs";
2
2
  import { BrowserSession } from "./Browser.mjs";
3
- import { _ as ToolInputSchema, d as Tool, u as Run } from "../Tool-Bkryw6-h.mjs";
3
+ import { _ as ToolInputSchema, d as Tool, u as Run } from "../Tool-BowQ7nAJ.mjs";
4
4
  import { Schema } from "effect";
5
5
  declare namespace BrowserTool_d_exports {
6
6
  export { browserToolkit, clickTool, fillTool, gotoTool, pressTool, scrollTool };
@@ -1,4 +1,4 @@
1
- import { o as HistoryItem, r as ContentBlock } from "../Items-Bvx8s9QH.mjs";
1
+ import { o as HistoryItem, r as ContentBlock } from "../Items-WuoPxBdV.mjs";
2
2
  import { Effect } from "effect";
3
3
  declare namespace Capabilities_d_exports {
4
4
  export { CapabilityWarning, warnDropped, warnDroppedBlocks, warnDroppedWhen };
@@ -1,2 +1,2 @@
1
- import { A as isFileCitation, B as isRefusal, C as ToolOutputContent, D as file, E as assistantText, F as isInputText, G as systemText, H as isToolCallOutput, I as isMessage, J as userText, K as text, L as isOutputImage, M as isInputFile, N as isInputImage, O as image, P as isInputJson, R as isOutputText, S as ToolCallOutput, T as Usage, U as isUrlCitation, V as isToolCall, W as json, _ as Reasoning, a as FilePath, b as StopReason, c as InputImage, d as InputTokensDetails, g as OutputTokensDetails, h as OutputText, i as FileCitation, j as isFilePath, k as isContainerFileCitation, l as InputJson, m as OutputImage, n as ContainerFileCitation, o as HistoryItem, p as Message, q as toolCallOutput, r as ContentBlock, s as InputFile, t as Annotation, u as InputText, v as Refusal, w as UrlCitation, x as ToolCall, y as Role, z as isReasoning } from "../Items-Bvx8s9QH.mjs";
1
+ import { A as isFileCitation, B as isRefusal, C as ToolOutputContent, D as file, E as assistantText, F as isInputText, G as systemText, H as isToolCallOutput, I as isMessage, J as userText, K as text, L as isOutputImage, M as isInputFile, N as isInputImage, O as image, P as isInputJson, R as isOutputText, S as ToolCallOutput, T as Usage, U as isUrlCitation, V as isToolCall, W as json, _ as Reasoning, a as FilePath, b as StopReason, c as InputImage, d as InputTokensDetails, g as OutputTokensDetails, h as OutputText, i as FileCitation, j as isFilePath, k as isContainerFileCitation, l as InputJson, m as OutputImage, n as ContainerFileCitation, o as HistoryItem, p as Message, q as toolCallOutput, r as ContentBlock, s as InputFile, t as Annotation, u as InputText, v as Refusal, w as UrlCitation, x as ToolCall, y as Role, z as isReasoning } from "../Items-WuoPxBdV.mjs";
2
2
  export { Annotation, ContainerFileCitation, ContentBlock, FileCitation, FilePath, HistoryItem, InputFile, InputImage, InputJson, InputText, InputTokensDetails, Message, OutputImage, OutputText, OutputTokensDetails, Reasoning, Refusal, Role, StopReason, ToolCall, ToolCallOutput, ToolOutputContent, UrlCitation, Usage, assistantText, file, image, isContainerFileCitation, isFileCitation, isFilePath, isInputFile, isInputImage, isInputJson, isInputText, isMessage, isOutputImage, isOutputText, isReasoning, isRefusal, isToolCall, isToolCallOutput, isUrlCitation, json, systemText, text, toolCallOutput, userText };
@@ -1,6 +1,6 @@
1
1
  import { o as ImageSource } from "../Image-Bzc1H_UK.mjs";
2
- import { S as ToolCallOutput, T as Usage, o as HistoryItem, x as ToolCall } from "../Items-Bvx8s9QH.mjs";
3
- import { f as ToolDescriptor } from "../Tool-Bkryw6-h.mjs";
2
+ import { S as ToolCallOutput, T as Usage, o as HistoryItem, x as ToolCall } from "../Items-WuoPxBdV.mjs";
3
+ import { f as ToolDescriptor } from "../Tool-BowQ7nAJ.mjs";
4
4
  import { r as AudioFormat } from "../Audio-_nGR4V0X.mjs";
5
5
  import { Data, Duration } from "effect";
6
6
  declare namespace Realtime_d_exports {
@@ -1,4 +1,4 @@
1
- import { o as HistoryItem } from "../Items-Bvx8s9QH.mjs";
1
+ import { o as HistoryItem } from "../Items-WuoPxBdV.mjs";
2
2
  import { JobRef, JobState } from "../job/Job.mjs";
3
3
  import { Turn } from "./Turn.mjs";
4
4
  declare namespace Research_d_exports {
@@ -1,6 +1,6 @@
1
1
  import { i as FileSource } from "../File-B923KvZ9.mjs";
2
2
  import { o as ImageSource } from "../Image-Bzc1H_UK.mjs";
3
- import { S as ToolCallOutput, T as Usage, _ as Reasoning, o as HistoryItem, p as Message, t as Annotation, x as ToolCall } from "../Items-Bvx8s9QH.mjs";
3
+ import { S as ToolCallOutput, T as Usage, _ as Reasoning, o as HistoryItem, p as Message, t as Annotation, x as ToolCall } from "../Items-WuoPxBdV.mjs";
4
4
  import { i as StructuredFormat, n as JsonParseError, r as StructuredDecodeError } from "../StructuredFormat-BlZhyOsi.mjs";
5
5
  import { Data, Effect, Schema, Stream } from "effect";
6
6
  declare namespace Turn_d_exports {
package/dist/index.d.mts CHANGED
@@ -2,8 +2,8 @@ import { t as BrowserError_d_exports } from "./browser/BrowserError.mjs";
2
2
  import { t as Browser_d_exports } from "./browser/Browser.mjs";
3
3
  import { s as Media_d_exports } from "./Media-BbX7BAaO.mjs";
4
4
  import { l as Image_d_exports } from "./Image-Bzc1H_UK.mjs";
5
- import { f as Items_d_exports } from "./Items-Bvx8s9QH.mjs";
6
- import { S as Tool_d_exports } from "./Tool-Bkryw6-h.mjs";
5
+ import { f as Items_d_exports } from "./Items-WuoPxBdV.mjs";
6
+ import { S as Tool_d_exports } from "./Tool-BowQ7nAJ.mjs";
7
7
  import { t as BrowserTool_d_exports } from "./browser/BrowserTool.mjs";
8
8
  import { t as Capabilities_d_exports } from "./capabilities/Capabilities.mjs";
9
9
  import { n as AiError_d_exports } from "./AiError-DvhLIbmd.mjs";
@@ -27,8 +27,8 @@ import { t as RealtimeSession_d_exports } from "./realtime/RealtimeSession.mjs";
27
27
  import { t as Loop_d_exports } from "./Loop-CeA0AelN.mjs";
28
28
  import { i as ToolEvent_d_exports } from "./ToolEvent-9inLx5cI.mjs";
29
29
  import { t as Content_d_exports } from "./Content-D_Qfn8Ja.mjs";
30
- import { s as ToolOutput_d_exports } from "./ToolOutput-BNTIQgGB.mjs";
31
- import { h as Toolkit_d_exports } from "./Toolkit-D2VGeD5R.mjs";
30
+ import { s as ToolOutput_d_exports } from "./ToolOutput-Be0DKBO3.mjs";
31
+ import { h as Toolkit_d_exports } from "./Toolkit-DPmXvAcr.mjs";
32
32
  import { t as LanguageModel_d_exports } from "./language-model/LanguageModel.mjs";
33
33
  import { r as MessengerError_d_exports } from "./MessengerError-CeK6VAcu.mjs";
34
34
  import { t as Messenger_d_exports } from "./messenger/Messenger.mjs";
@@ -1,8 +1,8 @@
1
- import { o as HistoryItem } from "../Items-Bvx8s9QH.mjs";
1
+ import { o as HistoryItem } from "../Items-WuoPxBdV.mjs";
2
2
  import { t as AiError } from "../AiError-DvhLIbmd.mjs";
3
3
  import { i as StructuredFormat } from "../StructuredFormat-BlZhyOsi.mjs";
4
4
  import { Turn, TurnEvent } from "../domain/Turn.mjs";
5
- import { d as Toolkit } from "../Toolkit-D2VGeD5R.mjs";
5
+ import { d as Toolkit } from "../Toolkit-DPmXvAcr.mjs";
6
6
  import { Context, Effect, Stream } from "effect";
7
7
  declare namespace LanguageModel_d_exports {
8
8
  export { CommonRequest, LanguageModel, LanguageModelService, streamTurn, turn, turnFromStream };
@@ -1,4 +1,4 @@
1
- import { T as Usage } from "../Items-Bvx8s9QH.mjs";
1
+ import { T as Usage } from "../Items-WuoPxBdV.mjs";
2
2
  import { TurnEvent } from "../domain/Turn.mjs";
3
3
  import { Duration, Effect, Option, Stream } from "effect";
4
4
  declare namespace Metrics_d_exports {
@@ -1,4 +1,4 @@
1
- import { o as HistoryItem } from "../Items-Bvx8s9QH.mjs";
1
+ import { o as HistoryItem } from "../Items-WuoPxBdV.mjs";
2
2
  import { Turn } from "../domain/Turn.mjs";
3
3
  import { LanguageModel, LanguageModelService } from "../language-model/LanguageModel.mjs";
4
4
  import { Duration, Effect, Layer } from "effect";
@@ -1,4 +1,4 @@
1
- import { S as ToolCallOutput, o as HistoryItem, x as ToolCall } from "../Items-Bvx8s9QH.mjs";
1
+ import { S as ToolCallOutput, o as HistoryItem, x as ToolCall } from "../Items-WuoPxBdV.mjs";
2
2
  import { Effect, Schema } from "effect";
3
3
  declare namespace HistoryCheck_d_exports {
4
4
  export { cancelAllPending, findUnansweredCalls, isReconciled };
@@ -1,2 +1,2 @@
1
- import { A as fromStandardSchema, B as withName, C as WithFailures, D as descriptorsOf, E as decodeCallInput, F as provider, I as providerToolsOf, L as toDescriptors, M as isStreamed, N as make, O as fail, P as noInput, R as toStream, T as decodeArgs, V as withRun, _ as ToolInputSchema, a as Declared, b as ToolUnhandled, c as InputSchema, d as Tool, f as ToolDescriptor, g as ToolFailure, h as ToolFailed, i as AnyTool, j as isProviderTool, k as fromEffectSchema, l as ProviderTool, m as ToolError, n as AnyDescribed, o as DecodableTool, p as ToolE, r as AnyLocalTool, s as DecodeResult, t as AnyDeclared, u as Run, v as ToolOutput, w as declare, x as ToolValidationError, y as ToolR, z as withFailures } from "../Tool-Bkryw6-h.mjs";
1
+ import { A as fromStandardSchema, B as withName, C as WithFailures, D as descriptorsOf, E as decodeCallInput, F as provider, I as providerToolsOf, L as toDescriptors, M as isStreamed, N as make, O as fail, P as noInput, R as toStream, T as decodeArgs, V as withRun, _ as ToolInputSchema, a as Declared, b as ToolUnhandled, c as InputSchema, d as Tool, f as ToolDescriptor, g as ToolFailure, h as ToolFailed, i as AnyTool, j as isProviderTool, k as fromEffectSchema, l as ProviderTool, m as ToolError, n as AnyDescribed, o as DecodableTool, p as ToolE, r as AnyLocalTool, s as DecodeResult, t as AnyDeclared, u as Run, v as ToolOutput, w as declare, x as ToolValidationError, y as ToolR, z as withFailures } from "../Tool-BowQ7nAJ.mjs";
2
2
  export { AnyDeclared, AnyDescribed, AnyLocalTool, AnyTool, Declared, DecodableTool, DecodeResult, InputSchema, ProviderTool, Run, Tool, ToolDescriptor, ToolE, ToolError, ToolFailed, ToolFailure, ToolInputSchema, ToolOutput, ToolR, ToolUnhandled, ToolValidationError, WithFailures, declare, decodeArgs, decodeCallInput, descriptorsOf, fail, fromEffectSchema, fromStandardSchema, isProviderTool, isStreamed, make, noInput, provider, providerToolsOf, toDescriptors, toStream, withFailures, withName, withRun };
@@ -1,4 +1,4 @@
1
- import { x as ToolCall } from "../Items-Bvx8s9QH.mjs";
1
+ import { x as ToolCall } from "../Items-WuoPxBdV.mjs";
2
2
  import { Schema } from "effect";
3
3
  declare namespace ToolDecision_d_exports {
4
4
  export { Answer, ByTool, Closing, DecisionFor, DecisionOf, Decisions, Default, Denied, Entry, Invalid, Resolved, ResolvedByTool, byTool, closesWith, make };
@@ -1,2 +1,2 @@
1
- import { _ as success, a as PartJson, b as valueParts, c as UnknownTool, d as failure, f as isTextual, g as single, h as parts, i as OutputInvalid, l as ValueParts, m as partText, n as CoreError, o as RunError, p as make, r as InputInvalid, t as Cancelled, u as encoded, v as text, y as value } from "../ToolOutput-BNTIQgGB.mjs";
1
+ import { _ as success, a as PartJson, b as valueParts, c as UnknownTool, d as failure, f as isTextual, g as single, h as parts, i as OutputInvalid, l as ValueParts, m as partText, n as CoreError, o as RunError, p as make, r as InputInvalid, t as Cancelled, u as encoded, v as text, y as value } from "../ToolOutput-Be0DKBO3.mjs";
2
2
  export { Cancelled, CoreError, InputInvalid, OutputInvalid, PartJson, RunError, UnknownTool, ValueParts, encoded, failure, isTextual, make, partText, parts, single, success, text, value, valueParts };
@@ -1,2 +1,2 @@
1
- import { A as namespace, C as decode, D as isOutcome, E as fromArray, F as withFailures, I as wrap, M as output, N as run, O as make, P as split, S as continueWith, T as descriptors, _ as UniqueTools, a as Handler, b as complete, c as Outcome, d as Toolkit, f as ToolkitE, g as UndeclaredFailure, i as ExecuteOptions, j as next, k as makeNamespaced, l as Split, m as ToolkitR, n as DuplicateToolName, o as Middleware, p as ToolkitFailure, r as Event, s as NoDuplicateNames, t as DeclaredCall, u as ToolMap, v as appendResults, w as describeFailures, x as compose, y as close } from "../Toolkit-D2VGeD5R.mjs";
1
+ import { A as namespace, C as decode, D as isOutcome, E as fromArray, F as withFailures, I as wrap, M as output, N as run, O as make, P as split, S as continueWith, T as descriptors, _ as UniqueTools, a as Handler, b as complete, c as Outcome, d as Toolkit, f as ToolkitE, g as UndeclaredFailure, i as ExecuteOptions, j as next, k as makeNamespaced, l as Split, m as ToolkitR, n as DuplicateToolName, o as Middleware, p as ToolkitFailure, r as Event, s as NoDuplicateNames, t as DeclaredCall, u as ToolMap, v as appendResults, w as describeFailures, x as compose, y as close } from "../Toolkit-DPmXvAcr.mjs";
2
2
  export { DeclaredCall, DuplicateToolName, Event, ExecuteOptions, Handler, Middleware, NoDuplicateNames, Outcome, Split, ToolMap, Toolkit, ToolkitE, ToolkitFailure, ToolkitR, UndeclaredFailure, UniqueTools, appendResults, close, complete, compose, continueWith, decode, describeFailures, descriptors, fromArray, isOutcome, make, makeNamespaced, namespace, next, output, run, split, withFailures, wrap };
@@ -1,4 +1,4 @@
1
- import { d as Tool } from "../Tool-Bkryw6-h.mjs";
1
+ import { d as Tool } from "../Tool-BowQ7nAJ.mjs";
2
2
  import { t as AiError } from "../AiError-DvhLIbmd.mjs";
3
3
  import { ReadFormat, ReadResponse, WebRead } from "./WebRead.mjs";
4
4
  import { Schema } from "effect";
@@ -1 +1 @@
1
- {"version":3,"file":"WebReadTool.d.mts","names":[],"sources":["../../src/web-read/WebReadTool.ts"],"mappings":";;;;;;;;;;;;;cAWM,iBAAe,OAAA;gBAAf,OAAA;;KAMM,yBAAyB,gBAAgB;KAYzC;;WAED;;;;;WAKA,SAAS;;;;;WAKT;;;;;WAKA,UAAU,UAAU;;;;;;;;;;;;;;;;;;cAmBlB,cAAW,UACZ,uBACT,aAAkB,gCAAgC,SAAiB"}
1
+ {"version":3,"file":"WebReadTool.d.mts","names":[],"sources":["../../src/web-read/WebReadTool.ts"],"mappings":";;;;;;;;;;;;;cAWa,iBAAe,OAAA;gBAAf,OAAA;;KAMD,yBAAyB,gBAAgB;KAYzC;;WAED;;;;;WAKA,SAAS;;;;;WAKT;;;;;WAKA,UAAU,UAAU;;;;;;;;;;;;;;;;;;cAmBlB,cAAW,UACZ,uBACT,aAAkB,gCAAgC,SAAiB"}
@@ -3,7 +3,10 @@ import { fromEffectSchema, make } from "../tool/Tool.mjs";
3
3
  import { read } from "./WebRead.mjs";
4
4
  import { Effect, Schema } from "effect";
5
5
  //#region src/web-read/WebReadTool.ts
6
- var WebReadTool_exports = /* @__PURE__ */ __exportAll({ webReadTool: () => webReadTool });
6
+ var WebReadTool_exports = /* @__PURE__ */ __exportAll({
7
+ WebReadToolArgs: () => WebReadToolArgs,
8
+ webReadTool: () => webReadTool
9
+ });
7
10
  /**
8
11
  * Model-facing argument schema. Deliberately narrow: the URL is the only
9
12
  * thing that is genuinely the model's call. Output format and the content
@@ -55,6 +58,6 @@ const webReadTool = (options) => {
55
58
  });
56
59
  };
57
60
  //#endregion
58
- export { WebReadTool_exports as t, webReadTool };
61
+ export { WebReadToolArgs, WebReadTool_exports as t, webReadTool };
59
62
 
60
63
  //# sourceMappingURL=WebReadTool.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebReadTool.mjs","names":["Tool.make","Tool.fromEffectSchema"],"sources":["../../src/web-read/WebReadTool.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\"\nimport type * as AiError from \"../domain/AiError.js\"\nimport * as Tool from \"../tool/Tool.js\"\nimport { read, type ReadFormat, type ReadResponse, WebRead } from \"./WebRead.js\"\n\n/**\n * Model-facing argument schema. Deliberately narrow: the URL is the only\n * thing that is genuinely the model's call. Output format and the content\n * cost ceiling are app policy, pinned on the constructor instead, so they\n * are guaranteed rather than left to the model to remember each call.\n */\nconst WebReadToolArgs = Schema.Struct({\n url: Schema.String.annotate({\n description: \"Absolute URL of the page to read.\",\n }),\n})\n\nexport type WebReadToolArgs = typeof WebReadToolArgs.Type\n\n/** `title / url` header plus the extracted content - what a model reads best. */\nconst defaultRender = (response: ReadResponse, maxChars: number): string => {\n const header = response.title === undefined ? response.url : `${response.title}\\n${response.url}`\n const body =\n response.content.length > maxChars\n ? `${response.content.slice(0, maxChars)}\\n[content truncated at ${maxChars} characters]`\n : response.content\n return `${header}\\n\\n${body}`\n}\n\nexport type WebReadToolOptions = {\n /** Tool name the model sees. Default `\"web_read\"`. */\n readonly name?: string\n /**\n * App-fixed representation for every read - a policy choice, not a model\n * knob. Default `\"markdown\"` (what models read best).\n */\n readonly format?: ReadFormat\n /**\n * App-fixed ceiling on rendered content characters per call - a context\n * cost guard, not exposed to the model. Default `20000`.\n */\n readonly maxChars?: number\n /**\n * Override how a read response is rendered into the model-facing string.\n * Default: `title / url` header plus the content, truncated at `maxChars`.\n */\n readonly render?: (response: ReadResponse) => string\n}\n\n/**\n * The canonical web-read tool. Its `R` is just `WebRead`, so providing any\n * read-provider Layer satisfies it and the model-facing contract (name,\n * description, schema) is identical no matter which backend answers - swap\n * `FirecrawlRead.layer` for `JinaRead.layer` and the tool the model sees\n * does not change. Drops straight into a `Toolkit` next to `webSearchTool`\n * (search finds the URLs, read fetches the ones worth reading in full).\n *\n * `Output` is the rendered page; failures stay typed on the `AiError`\n * channel. To let the model recover from a failed read, wrap the toolkit in\n * `Toolkit.describeFailures(AiError.describe)`.\n *\n * This is a simple default implementation for quick use. For more elaborate\n * cases (a different output contract, more model-facing knobs), build your\n * own tool with `Tool.make` over the same `read` helper.\n */\nexport const webReadTool = (\n options?: WebReadToolOptions,\n): Tool.Tool<string, WebReadToolArgs, string, never, AiError.AiError, WebRead> => {\n const name = options?.name ?? \"web_read\"\n const format = options?.format ?? \"markdown\"\n const maxChars = options?.maxChars ?? 20_000\n const render = options?.render ?? ((response: ReadResponse) => defaultRender(response, maxChars))\n return Tool.make({\n name,\n description:\n \"Read a web page and return its content as clean text. Use it to read a promising URL in full (e.g. one found via search).\",\n inputSchema: Tool.fromEffectSchema(WebReadToolArgs),\n outputSchema: Schema.String,\n // The call is wrapped in a tracing span so agent traces show the tool\n // invocation (url, format, content length) nested under the model turn.\n // `withSpan` is a no-op until a Tracer is installed, so this is free by\n // default and adds nothing to the requirements.\n run: (args) =>\n read({ url: args.url, format }).pipe(\n Effect.tap((r) => Effect.annotateCurrentSpan(\"web_read.content_chars\", r.content.length)),\n Effect.map(render),\n Effect.withSpan(name, {\n kind: \"client\",\n attributes: {\n \"web_read.url\": args.url,\n \"web_read.format\": format,\n \"web_read.max_chars\": maxChars,\n },\n }),\n ),\n })\n}\n"],"mappings":";;;;;;;;;;;;AAWA,MAAM,kBAAkB,OAAO,OAAO,EACpC,KAAK,OAAO,OAAO,SAAS,EAC1B,aAAa,oCACf,CAAC,EACH,CAAC;;AAKD,MAAM,iBAAiB,UAAwB,aAA6B;CAM1E,OAAO,GALQ,SAAS,UAAU,KAAA,IAAY,SAAS,MAAM,GAAG,SAAS,MAAM,IAAI,SAAS,MAK3E,MAHf,SAAS,QAAQ,SAAS,WACtB,GAAG,SAAS,QAAQ,MAAM,GAAG,QAAQ,EAAE,0BAA0B,SAAS,gBAC1E,SAAS;AAEjB;;;;;;;;;;;;;;;;;AAsCA,MAAa,eACX,YACgF;CAChF,MAAM,OAAO,SAAS,QAAQ;CAC9B,MAAM,SAAS,SAAS,UAAU;CAClC,MAAM,WAAW,SAAS,YAAY;CACtC,MAAM,SAAS,SAAS,YAAY,aAA2B,cAAc,UAAU,QAAQ;CAC/F,OAAOA,KAAU;EACf;EACA,aACE;EACF,aAAaC,iBAAsB,eAAe;EAClD,cAAc,OAAO;EAKrB,MAAM,SACJ,KAAK;GAAE,KAAK,KAAK;GAAK;EAAO,CAAC,CAAC,CAAC,KAC9B,OAAO,KAAK,MAAM,OAAO,oBAAoB,0BAA0B,EAAE,QAAQ,MAAM,CAAC,GACxF,OAAO,IAAI,MAAM,GACjB,OAAO,SAAS,MAAM;GACpB,MAAM;GACN,YAAY;IACV,gBAAgB,KAAK;IACrB,mBAAmB;IACnB,sBAAsB;GACxB;EACF,CAAC,CACH;CACJ,CAAC;AACH"}
1
+ {"version":3,"file":"WebReadTool.mjs","names":["Tool.make","Tool.fromEffectSchema"],"sources":["../../src/web-read/WebReadTool.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\"\nimport type * as AiError from \"../domain/AiError.js\"\nimport * as Tool from \"../tool/Tool.js\"\nimport { read, type ReadFormat, type ReadResponse, WebRead } from \"./WebRead.js\"\n\n/**\n * Model-facing argument schema. Deliberately narrow: the URL is the only\n * thing that is genuinely the model's call. Output format and the content\n * cost ceiling are app policy, pinned on the constructor instead, so they\n * are guaranteed rather than left to the model to remember each call.\n */\nexport const WebReadToolArgs = Schema.Struct({\n url: Schema.String.annotate({\n description: \"Absolute URL of the page to read.\",\n }),\n})\n\nexport type WebReadToolArgs = typeof WebReadToolArgs.Type\n\n/** `title / url` header plus the extracted content - what a model reads best. */\nconst defaultRender = (response: ReadResponse, maxChars: number): string => {\n const header = response.title === undefined ? response.url : `${response.title}\\n${response.url}`\n const body =\n response.content.length > maxChars\n ? `${response.content.slice(0, maxChars)}\\n[content truncated at ${maxChars} characters]`\n : response.content\n return `${header}\\n\\n${body}`\n}\n\nexport type WebReadToolOptions = {\n /** Tool name the model sees. Default `\"web_read\"`. */\n readonly name?: string\n /**\n * App-fixed representation for every read - a policy choice, not a model\n * knob. Default `\"markdown\"` (what models read best).\n */\n readonly format?: ReadFormat\n /**\n * App-fixed ceiling on rendered content characters per call - a context\n * cost guard, not exposed to the model. Default `20000`.\n */\n readonly maxChars?: number\n /**\n * Override how a read response is rendered into the model-facing string.\n * Default: `title / url` header plus the content, truncated at `maxChars`.\n */\n readonly render?: (response: ReadResponse) => string\n}\n\n/**\n * The canonical web-read tool. Its `R` is just `WebRead`, so providing any\n * read-provider Layer satisfies it and the model-facing contract (name,\n * description, schema) is identical no matter which backend answers - swap\n * `FirecrawlRead.layer` for `JinaRead.layer` and the tool the model sees\n * does not change. Drops straight into a `Toolkit` next to `webSearchTool`\n * (search finds the URLs, read fetches the ones worth reading in full).\n *\n * `Output` is the rendered page; failures stay typed on the `AiError`\n * channel. To let the model recover from a failed read, wrap the toolkit in\n * `Toolkit.describeFailures(AiError.describe)`.\n *\n * This is a simple default implementation for quick use. For more elaborate\n * cases (a different output contract, more model-facing knobs), build your\n * own tool with `Tool.make` over the same `read` helper.\n */\nexport const webReadTool = (\n options?: WebReadToolOptions,\n): Tool.Tool<string, WebReadToolArgs, string, never, AiError.AiError, WebRead> => {\n const name = options?.name ?? \"web_read\"\n const format = options?.format ?? \"markdown\"\n const maxChars = options?.maxChars ?? 20_000\n const render = options?.render ?? ((response: ReadResponse) => defaultRender(response, maxChars))\n return Tool.make({\n name,\n description:\n \"Read a web page and return its content as clean text. Use it to read a promising URL in full (e.g. one found via search).\",\n inputSchema: Tool.fromEffectSchema(WebReadToolArgs),\n outputSchema: Schema.String,\n // The call is wrapped in a tracing span so agent traces show the tool\n // invocation (url, format, content length) nested under the model turn.\n // `withSpan` is a no-op until a Tracer is installed, so this is free by\n // default and adds nothing to the requirements.\n run: (args) =>\n read({ url: args.url, format }).pipe(\n Effect.tap((r) => Effect.annotateCurrentSpan(\"web_read.content_chars\", r.content.length)),\n Effect.map(render),\n Effect.withSpan(name, {\n kind: \"client\",\n attributes: {\n \"web_read.url\": args.url,\n \"web_read.format\": format,\n \"web_read.max_chars\": maxChars,\n },\n }),\n ),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,OAAO,EAC3C,KAAK,OAAO,OAAO,SAAS,EAC1B,aAAa,oCACf,CAAC,EACH,CAAC;;AAKD,MAAM,iBAAiB,UAAwB,aAA6B;CAM1E,OAAO,GALQ,SAAS,UAAU,KAAA,IAAY,SAAS,MAAM,GAAG,SAAS,MAAM,IAAI,SAAS,MAK3E,MAHf,SAAS,QAAQ,SAAS,WACtB,GAAG,SAAS,QAAQ,MAAM,GAAG,QAAQ,EAAE,0BAA0B,SAAS,gBAC1E,SAAS;AAEjB;;;;;;;;;;;;;;;;;AAsCA,MAAa,eACX,YACgF;CAChF,MAAM,OAAO,SAAS,QAAQ;CAC9B,MAAM,SAAS,SAAS,UAAU;CAClC,MAAM,WAAW,SAAS,YAAY;CACtC,MAAM,SAAS,SAAS,YAAY,aAA2B,cAAc,UAAU,QAAQ;CAC/F,OAAOA,KAAU;EACf;EACA,aACE;EACF,aAAaC,iBAAsB,eAAe;EAClD,cAAc,OAAO;EAKrB,MAAM,SACJ,KAAK;GAAE,KAAK,KAAK;GAAK;EAAO,CAAC,CAAC,CAAC,KAC9B,OAAO,KAAK,MAAM,OAAO,oBAAoB,0BAA0B,EAAE,QAAQ,MAAM,CAAC,GACxF,OAAO,IAAI,MAAM,GACjB,OAAO,SAAS,MAAM;GACpB,MAAM;GACN,YAAY;IACV,gBAAgB,KAAK;IACrB,mBAAmB;IACnB,sBAAsB;GACxB;EACF,CAAC,CACH;CACJ,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { d as Tool } from "../Tool-Bkryw6-h.mjs";
1
+ import { d as Tool } from "../Tool-BowQ7nAJ.mjs";
2
2
  import { t as AiError } from "../AiError-DvhLIbmd.mjs";
3
3
  import { SearchResult, WebSearch } from "./WebSearch.mjs";
4
4
  import { Schema } from "effect";
@@ -1 +1 @@
1
- {"version":3,"file":"WebSearchTool.d.mts","names":[],"sources":["../../src/web-search/WebSearchTool.ts"],"mappings":";;;;;;;;;;;;;;;cAaM,mBAAiB,OAAA;;;;KAKX,2BAA2B,kBAAkB;KAa7C;;WAED;;;;;WAKA;;;;;WAKA,iBAAiB;;WAEjB,iBAAiB;;;;;WAKjB,UAAU,SAAS,cAAc;;;;;;;;;;;;;;;;;;;;;cAsB/B,gBAAa,UACd,yBACT,aAAkB,kCAAkC,SAAiB"}
1
+ {"version":3,"file":"WebSearchTool.d.mts","names":[],"sources":["../../src/web-search/WebSearchTool.ts"],"mappings":";;;;;;;;;;;;;;;cAaa,mBAAiB,OAAA;;;;KAKlB,2BAA2B,kBAAkB;KAa7C;;WAED;;;;;WAKA;;;;;WAKA,iBAAiB;;WAEjB,iBAAiB;;;;;WAKjB,UAAU,SAAS,cAAc;;;;;;;;;;;;;;;;;;;;;cAsB/B,gBAAa,UACd,yBACT,aAAkB,kCAAkC,SAAiB"}
@@ -3,7 +3,10 @@ import { fromEffectSchema, make } from "../tool/Tool.mjs";
3
3
  import { SearchRecency, search } from "./WebSearch.mjs";
4
4
  import { Effect, Schema } from "effect";
5
5
  //#region src/web-search/WebSearchTool.ts
6
- var WebSearchTool_exports = /* @__PURE__ */ __exportAll({ webSearchTool: () => webSearchTool });
6
+ var WebSearchTool_exports = /* @__PURE__ */ __exportAll({
7
+ WebSearchToolArgs: () => WebSearchToolArgs,
8
+ webSearchTool: () => webSearchTool
9
+ });
7
10
  /**
8
11
  * Model-facing argument schema. Deliberately narrow: `query` plus the one
9
12
  * filter that is genuinely the model's call - `recency` (it knows whether a
@@ -70,6 +73,6 @@ const webSearchTool = (options) => {
70
73
  });
71
74
  };
72
75
  //#endregion
73
- export { WebSearchTool_exports as t, webSearchTool };
76
+ export { WebSearchToolArgs, WebSearchTool_exports as t, webSearchTool };
74
77
 
75
78
  //# sourceMappingURL=WebSearchTool.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebSearchTool.mjs","names":["Tool.make","Tool.fromEffectSchema"],"sources":["../../src/web-search/WebSearchTool.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\"\nimport type * as AiError from \"../domain/AiError.js\"\nimport * as Tool from \"../tool/Tool.js\"\nimport { search, SearchRecency, type SearchResult, WebSearch } from \"./WebSearch.js\"\n\n/**\n * Model-facing argument schema. Deliberately narrow: `query` plus the one\n * filter that is genuinely the model's call - `recency` (it knows whether a\n * question is about current events or evergreen). App-policy scoping\n * (`includeDomains` / `excludeDomains`) and the `maxResults` cost ceiling\n * are pinned on the constructor instead, so they are guaranteed rather than\n * left to the model to remember each call.\n */\nconst WebSearchToolArgs = Schema.Struct({\n query: Schema.String,\n recency: Schema.optional(SearchRecency),\n})\n\nexport type WebSearchToolArgs = typeof WebSearchToolArgs.Type\n\n/** Numbered `title / url / snippet` list - what a model reads best. */\nconst defaultRender = (results: ReadonlyArray<SearchResult>): string =>\n results.length === 0\n ? \"No results found.\"\n : results\n .map((r, i) => {\n const head = `${i + 1}. ${r.title ?? r.url}\\n ${r.url}`\n return r.snippet === undefined ? head : `${head}\\n ${r.snippet}`\n })\n .join(\"\\n\\n\")\n\nexport type WebSearchToolOptions = {\n /** Tool name the model sees. Default `\"web_search\"`. */\n readonly name?: string\n /**\n * App-fixed ceiling on results per call - a cost guard, not exposed to\n * the model. Default `5`.\n */\n readonly maxResults?: number\n /**\n * App-fixed allowlist applied to every search. A policy scope (\"only\n * search our docs\"), not a model knob - so it is enforced, not requested.\n */\n readonly includeDomains?: ReadonlyArray<string>\n /** App-fixed denylist applied to every search (\"never return X\"). */\n readonly excludeDomains?: ReadonlyArray<string>\n /**\n * Override how results are rendered into the model-facing string.\n * Default: a numbered `title / url / snippet` list.\n */\n readonly render?: (results: ReadonlyArray<SearchResult>) => string\n}\n\n/**\n * The canonical web-search tool. Its `R` is just `WebSearch`, so providing\n * any search-provider Layer satisfies it and the model-facing contract\n * (name, description, schema) is identical no matter which backend answers\n * - swap `PerplexitySearch.layer` for `ExaSearch.layer` and the tool the\n * model sees does not change. Drops straight into a `Toolkit` and the\n * `LanguageModel` tool-calling loop.\n *\n * The model controls only `query` and `recency`; domain scoping and the\n * result cap are app policy, fixed here on the constructor. `Output` is the\n * rendered text (the model reads a numbered list better than raw\n * `SearchResult[]`; pass `render` to change the format); failures stay typed\n * on the `AiError` channel. To let the model recover from a failed search,\n * wrap the toolkit in `Toolkit.describeFailures(AiError.describe)`.\n *\n * This is a simple default implementation for quick use. For more elaborate\n * cases (a different output contract, more model-facing knobs), build your\n * own tool with `Tool.make` over the same `search` helper.\n */\nexport const webSearchTool = (\n options?: WebSearchToolOptions,\n): Tool.Tool<string, WebSearchToolArgs, string, never, AiError.AiError, WebSearch> => {\n const name = options?.name ?? \"web_search\"\n const render = options?.render ?? defaultRender\n const maxResults = options?.maxResults ?? 5\n const includeDomains = options?.includeDomains\n const excludeDomains = options?.excludeDomains\n return Tool.make({\n name,\n description:\n \"Search the web for current information. Returns ranked results with titles, URLs, and snippets.\",\n inputSchema: Tool.fromEffectSchema(WebSearchToolArgs),\n outputSchema: Schema.String,\n // The call is wrapped in a tracing span so agent traces show the tool\n // invocation (query, filters, result count) nested under the model turn.\n // `withSpan` is a no-op until a Tracer is installed, so this is free by\n // default and adds nothing to the requirements.\n run: (args) =>\n search({\n query: args.query,\n maxResults,\n ...(args.recency !== undefined && { recency: args.recency }),\n ...(includeDomains !== undefined && { includeDomains }),\n ...(excludeDomains !== undefined && { excludeDomains }),\n }).pipe(\n Effect.tap((r) => Effect.annotateCurrentSpan(\"web_search.result_count\", r.results.length)),\n Effect.map((r) => render(r.results)),\n Effect.withSpan(name, {\n kind: \"client\",\n attributes: {\n \"web_search.query\": args.query,\n \"web_search.max_results\": maxResults,\n ...(args.recency !== undefined && { \"web_search.recency\": args.recency }),\n ...(includeDomains !== undefined && { \"web_search.include_domains\": includeDomains }),\n ...(excludeDomains !== undefined && { \"web_search.exclude_domains\": excludeDomains }),\n },\n }),\n ),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,oBAAoB,OAAO,OAAO;CACtC,OAAO,OAAO;CACd,SAAS,OAAO,SAAS,aAAa;AACxC,CAAC;;AAKD,MAAM,iBAAiB,YACrB,QAAQ,WAAW,IACf,sBACA,QACG,KAAK,GAAG,MAAM;CACb,MAAM,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,OAAO,EAAE;CACpD,OAAO,EAAE,YAAY,KAAA,IAAY,OAAO,GAAG,KAAK,OAAO,EAAE;AAC3D,CAAC,CAAC,CACD,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;AA2CpB,MAAa,iBACX,YACoF;CACpF,MAAM,OAAO,SAAS,QAAQ;CAC9B,MAAM,SAAS,SAAS,UAAU;CAClC,MAAM,aAAa,SAAS,cAAc;CAC1C,MAAM,iBAAiB,SAAS;CAChC,MAAM,iBAAiB,SAAS;CAChC,OAAOA,KAAU;EACf;EACA,aACE;EACF,aAAaC,iBAAsB,iBAAiB;EACpD,cAAc,OAAO;EAKrB,MAAM,SACJ,OAAO;GACL,OAAO,KAAK;GACZ;GACA,GAAI,KAAK,YAAY,KAAA,KAAa,EAAE,SAAS,KAAK,QAAQ;GAC1D,GAAI,mBAAmB,KAAA,KAAa,EAAE,eAAe;GACrD,GAAI,mBAAmB,KAAA,KAAa,EAAE,eAAe;EACvD,CAAC,CAAC,CAAC,KACD,OAAO,KAAK,MAAM,OAAO,oBAAoB,2BAA2B,EAAE,QAAQ,MAAM,CAAC,GACzF,OAAO,KAAK,MAAM,OAAO,EAAE,OAAO,CAAC,GACnC,OAAO,SAAS,MAAM;GACpB,MAAM;GACN,YAAY;IACV,oBAAoB,KAAK;IACzB,0BAA0B;IAC1B,GAAI,KAAK,YAAY,KAAA,KAAa,EAAE,sBAAsB,KAAK,QAAQ;IACvE,GAAI,mBAAmB,KAAA,KAAa,EAAE,8BAA8B,eAAe;IACnF,GAAI,mBAAmB,KAAA,KAAa,EAAE,8BAA8B,eAAe;GACrF;EACF,CAAC,CACH;CACJ,CAAC;AACH"}
1
+ {"version":3,"file":"WebSearchTool.mjs","names":["Tool.make","Tool.fromEffectSchema"],"sources":["../../src/web-search/WebSearchTool.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\"\nimport type * as AiError from \"../domain/AiError.js\"\nimport * as Tool from \"../tool/Tool.js\"\nimport { search, SearchRecency, type SearchResult, WebSearch } from \"./WebSearch.js\"\n\n/**\n * Model-facing argument schema. Deliberately narrow: `query` plus the one\n * filter that is genuinely the model's call - `recency` (it knows whether a\n * question is about current events or evergreen). App-policy scoping\n * (`includeDomains` / `excludeDomains`) and the `maxResults` cost ceiling\n * are pinned on the constructor instead, so they are guaranteed rather than\n * left to the model to remember each call.\n */\nexport const WebSearchToolArgs = Schema.Struct({\n query: Schema.String,\n recency: Schema.optional(SearchRecency),\n})\n\nexport type WebSearchToolArgs = typeof WebSearchToolArgs.Type\n\n/** Numbered `title / url / snippet` list - what a model reads best. */\nconst defaultRender = (results: ReadonlyArray<SearchResult>): string =>\n results.length === 0\n ? \"No results found.\"\n : results\n .map((r, i) => {\n const head = `${i + 1}. ${r.title ?? r.url}\\n ${r.url}`\n return r.snippet === undefined ? head : `${head}\\n ${r.snippet}`\n })\n .join(\"\\n\\n\")\n\nexport type WebSearchToolOptions = {\n /** Tool name the model sees. Default `\"web_search\"`. */\n readonly name?: string\n /**\n * App-fixed ceiling on results per call - a cost guard, not exposed to\n * the model. Default `5`.\n */\n readonly maxResults?: number\n /**\n * App-fixed allowlist applied to every search. A policy scope (\"only\n * search our docs\"), not a model knob - so it is enforced, not requested.\n */\n readonly includeDomains?: ReadonlyArray<string>\n /** App-fixed denylist applied to every search (\"never return X\"). */\n readonly excludeDomains?: ReadonlyArray<string>\n /**\n * Override how results are rendered into the model-facing string.\n * Default: a numbered `title / url / snippet` list.\n */\n readonly render?: (results: ReadonlyArray<SearchResult>) => string\n}\n\n/**\n * The canonical web-search tool. Its `R` is just `WebSearch`, so providing\n * any search-provider Layer satisfies it and the model-facing contract\n * (name, description, schema) is identical no matter which backend answers\n * - swap `PerplexitySearch.layer` for `ExaSearch.layer` and the tool the\n * model sees does not change. Drops straight into a `Toolkit` and the\n * `LanguageModel` tool-calling loop.\n *\n * The model controls only `query` and `recency`; domain scoping and the\n * result cap are app policy, fixed here on the constructor. `Output` is the\n * rendered text (the model reads a numbered list better than raw\n * `SearchResult[]`; pass `render` to change the format); failures stay typed\n * on the `AiError` channel. To let the model recover from a failed search,\n * wrap the toolkit in `Toolkit.describeFailures(AiError.describe)`.\n *\n * This is a simple default implementation for quick use. For more elaborate\n * cases (a different output contract, more model-facing knobs), build your\n * own tool with `Tool.make` over the same `search` helper.\n */\nexport const webSearchTool = (\n options?: WebSearchToolOptions,\n): Tool.Tool<string, WebSearchToolArgs, string, never, AiError.AiError, WebSearch> => {\n const name = options?.name ?? \"web_search\"\n const render = options?.render ?? defaultRender\n const maxResults = options?.maxResults ?? 5\n const includeDomains = options?.includeDomains\n const excludeDomains = options?.excludeDomains\n return Tool.make({\n name,\n description:\n \"Search the web for current information. Returns ranked results with titles, URLs, and snippets.\",\n inputSchema: Tool.fromEffectSchema(WebSearchToolArgs),\n outputSchema: Schema.String,\n // The call is wrapped in a tracing span so agent traces show the tool\n // invocation (query, filters, result count) nested under the model turn.\n // `withSpan` is a no-op until a Tracer is installed, so this is free by\n // default and adds nothing to the requirements.\n run: (args) =>\n search({\n query: args.query,\n maxResults,\n ...(args.recency !== undefined && { recency: args.recency }),\n ...(includeDomains !== undefined && { includeDomains }),\n ...(excludeDomains !== undefined && { excludeDomains }),\n }).pipe(\n Effect.tap((r) => Effect.annotateCurrentSpan(\"web_search.result_count\", r.results.length)),\n Effect.map((r) => render(r.results)),\n Effect.withSpan(name, {\n kind: \"client\",\n attributes: {\n \"web_search.query\": args.query,\n \"web_search.max_results\": maxResults,\n ...(args.recency !== undefined && { \"web_search.recency\": args.recency }),\n ...(includeDomains !== undefined && { \"web_search.include_domains\": includeDomains }),\n ...(excludeDomains !== undefined && { \"web_search.exclude_domains\": excludeDomains }),\n },\n }),\n ),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAaA,MAAa,oBAAoB,OAAO,OAAO;CAC7C,OAAO,OAAO;CACd,SAAS,OAAO,SAAS,aAAa;AACxC,CAAC;;AAKD,MAAM,iBAAiB,YACrB,QAAQ,WAAW,IACf,sBACA,QACG,KAAK,GAAG,MAAM;CACb,MAAM,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,OAAO,EAAE;CACpD,OAAO,EAAE,YAAY,KAAA,IAAY,OAAO,GAAG,KAAK,OAAO,EAAE;AAC3D,CAAC,CAAC,CACD,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;AA2CpB,MAAa,iBACX,YACoF;CACpF,MAAM,OAAO,SAAS,QAAQ;CAC9B,MAAM,SAAS,SAAS,UAAU;CAClC,MAAM,aAAa,SAAS,cAAc;CAC1C,MAAM,iBAAiB,SAAS;CAChC,MAAM,iBAAiB,SAAS;CAChC,OAAOA,KAAU;EACf;EACA,aACE;EACF,aAAaC,iBAAsB,iBAAiB;EACpD,cAAc,OAAO;EAKrB,MAAM,SACJ,OAAO;GACL,OAAO,KAAK;GACZ;GACA,GAAI,KAAK,YAAY,KAAA,KAAa,EAAE,SAAS,KAAK,QAAQ;GAC1D,GAAI,mBAAmB,KAAA,KAAa,EAAE,eAAe;GACrD,GAAI,mBAAmB,KAAA,KAAa,EAAE,eAAe;EACvD,CAAC,CAAC,CAAC,KACD,OAAO,KAAK,MAAM,OAAO,oBAAoB,2BAA2B,EAAE,QAAQ,MAAM,CAAC,GACzF,OAAO,KAAK,MAAM,OAAO,EAAE,OAAO,CAAC,GACnC,OAAO,SAAS,MAAM;GACpB,MAAM;GACN,YAAY;IACV,oBAAoB,KAAK;IACzB,0BAA0B;IAC1B,GAAI,KAAK,YAAY,KAAA,KAAa,EAAE,sBAAsB,KAAK,QAAQ;IACvE,GAAI,mBAAmB,KAAA,KAAa,EAAE,8BAA8B,eAAe;IACnF,GAAI,mBAAmB,KAAA,KAAa,EAAE,8BAA8B,eAAe;GACrF;EACF,CAAC,CACH;CACJ,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-uai/core",
3
- "version": "0.19.0-dev-20261110065930",
3
+ "version": "0.19.1",
4
4
  "description": "Low-level primitives (loop, conversation, items, tools, streaming codecs) for building AI agents with Effect.",
5
5
  "keywords": [
6
6
  "agents",
@@ -9,7 +9,7 @@ import { read, type ReadFormat, type ReadResponse, WebRead } from "./WebRead.js"
9
9
  * cost ceiling are app policy, pinned on the constructor instead, so they
10
10
  * are guaranteed rather than left to the model to remember each call.
11
11
  */
12
- const WebReadToolArgs = Schema.Struct({
12
+ export const WebReadToolArgs = Schema.Struct({
13
13
  url: Schema.String.annotate({
14
14
  description: "Absolute URL of the page to read.",
15
15
  }),
@@ -11,7 +11,7 @@ import { search, SearchRecency, type SearchResult, WebSearch } from "./WebSearch
11
11
  * are pinned on the constructor instead, so they are guaranteed rather than
12
12
  * left to the model to remember each call.
13
13
  */
14
- const WebSearchToolArgs = Schema.Struct({
14
+ export const WebSearchToolArgs = Schema.Struct({
15
15
  query: Schema.String,
16
16
  recency: Schema.optional(SearchRecency),
17
17
  })