@dudko.dev/agent-web 0.0.39 → 0.0.40
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/README.md +117 -2
- package/dist/agent-web.js +1 -1
- package/dist/agent-web.js.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp.cjs +112 -53
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.cts +18 -12
- package/dist/mcp.d.ts +18 -12
- package/dist/mcp.js +109 -50
- package/dist/mcp.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -6738,12 +6738,16 @@ var decisionModelFromAiSdk = (model, options = {}) => {
|
|
|
6738
6738
|
decide: async (question, call) => {
|
|
6739
6739
|
const result = await (0, import_ai12.experimental_decide)({
|
|
6740
6740
|
model,
|
|
6741
|
-
state
|
|
6741
|
+
// The API refuses an empty state (Google's answers 400 "Missing text in content"), and a
|
|
6742
|
+
// question asked without a context is its own subject.
|
|
6743
|
+
state: question.context?.trim() ? question.context : question.prompt,
|
|
6742
6744
|
questions: {
|
|
6743
6745
|
[QUESTION_KEY]: {
|
|
6744
6746
|
type: "choice",
|
|
6745
6747
|
instructions: question.prompt,
|
|
6746
|
-
criteria: Object.fromEntries(
|
|
6748
|
+
criteria: Object.fromEntries(
|
|
6749
|
+
question.options.map((o) => [o.id, o.description?.trim() ? o.description : o.id])
|
|
6750
|
+
)
|
|
6747
6751
|
}
|
|
6748
6752
|
},
|
|
6749
6753
|
maxRetries: options.maxRetries ?? 0,
|