@theokit/sdk-tools 0.22.0 → 0.22.2
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/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1739,8 +1739,8 @@ function askerDoContexto(context) {
|
|
|
1739
1739
|
function createQuestionTool(opts) {
|
|
1740
1740
|
const timeoutMs = opts.timeoutMs ?? 3e5;
|
|
1741
1741
|
return {
|
|
1742
|
-
name: "question",
|
|
1743
|
-
description: "Ask the user a question and wait for their response. Use when you need clarification or confirmation before proceeding. Returns { ok, answer } or { ok: false, error: 'timeout' }.",
|
|
1742
|
+
name: opts.name ?? "question",
|
|
1743
|
+
description: opts.description ?? "Ask the user a question and wait for their response. Use when you need clarification or confirmation before proceeding. Returns { ok, answer } or { ok: false, error: 'timeout' }.",
|
|
1744
1744
|
inputSchema: {
|
|
1745
1745
|
type: "object",
|
|
1746
1746
|
properties: {
|
|
@@ -1761,7 +1761,7 @@ function createQuestionTool(opts) {
|
|
|
1761
1761
|
setTimeout(() => reject(new Error("timeout")), timeoutMs);
|
|
1762
1762
|
});
|
|
1763
1763
|
try {
|
|
1764
|
-
const answer = await Promise.race([askUser(input.question), timeout]);
|
|
1764
|
+
const answer = await Promise.race([askUser(String(input.question ?? "")), timeout]);
|
|
1765
1765
|
return JSON.stringify({ ok: true, answer });
|
|
1766
1766
|
} catch (err) {
|
|
1767
1767
|
if (err instanceof Error && err.message === "timeout") {
|