typebulb 0.18.7 → 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.
- package/README.md +5 -6
- package/dist/agents/claude/client.js +4 -4
- package/dist/agents/pi/client.js +4 -4
- package/dist/ai/aiProvider.d.ts +3 -3
- package/dist/ai/aiProvider.d.ts.map +1 -1
- package/dist/ai/aiProvider.js +1 -1
- package/dist/ai/aiProvider.js.map +1 -1
- package/dist/ai/aiProviders.d.ts +2 -2
- package/dist/ai/aiProviders.d.ts.map +1 -1
- package/dist/ai/aiProviders.js +1 -1
- package/dist/ai/aiProviders.js.map +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/protocol.d.ts +3 -2
- package/dist/ai/protocol.d.ts.map +1 -1
- package/dist/ai/providers/anthropic.d.ts +1 -0
- package/dist/ai/providers/anthropic.d.ts.map +1 -1
- package/dist/ai/providers/anthropic.js +5 -4
- package/dist/ai/providers/anthropic.js.map +1 -1
- package/dist/ai/providers/gemini.d.ts.map +1 -1
- package/dist/ai/providers/gemini.js +9 -5
- package/dist/ai/providers/gemini.js.map +1 -1
- package/dist/ai/providers/openAI.d.ts +1 -1
- package/dist/ai/providers/openAI.d.ts.map +1 -1
- package/dist/ai/providers/openAI.js +1 -2
- package/dist/ai/providers/openAI.js.map +1 -1
- package/dist/ai/providers/openRouter.d.ts.map +1 -1
- package/dist/ai/providers/openRouter.js +1 -2
- package/dist/ai/providers/openRouter.js.map +1 -1
- package/dist/dts/tbTypings.d.ts +2 -2
- package/dist/dts/tbTypings.d.ts.map +1 -1
- package/dist/dts/tbTypings.js +3 -3
- package/dist/index.js +186 -186
- package/dist/render.js +4 -4
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -589,12 +589,12 @@ const something = require('module-name') // NOT SUPPORTED!
|
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
// tb.ai(): non-streaming, resolves with the full { text } (unchanged 90% path).
|
|
592
|
-
const aiCall = async ({ messages, system,
|
|
592
|
+
const aiCall = async ({ messages, system, effort, provider, model, webSearch, signal } = {}) => {
|
|
593
593
|
if (isEmbedded) throw embedErr('tb.ai()');
|
|
594
594
|
const resp = await fetch('/__ai', {
|
|
595
595
|
method: 'POST',
|
|
596
596
|
headers: { 'Content-Type': 'application/json' },
|
|
597
|
-
body: JSON.stringify({ messages, system,
|
|
597
|
+
body: JSON.stringify({ messages, system, effort, provider, model, webSearch }),
|
|
598
598
|
signal
|
|
599
599
|
});
|
|
600
600
|
if (resp.status === 403) throw new Error((await resp.text().catch(() => '')) || 'tb.ai() is blocked \u2014 re-run with --trust');
|
|
@@ -611,11 +611,11 @@ const something = require('module-name') // NOT SUPPORTED!
|
|
|
611
611
|
// streaming tb.server.<gen>(). Break the loop (or abort the signal) to cancel.
|
|
612
612
|
const aiStream = (opts = {}) => (async function* () {
|
|
613
613
|
if (isEmbedded) throw embedErr('tb.ai.stream()');
|
|
614
|
-
const { messages, system,
|
|
614
|
+
const { messages, system, effort, provider, model, webSearch, signal } = opts;
|
|
615
615
|
const resp = await fetch('/__ai', {
|
|
616
616
|
method: 'POST',
|
|
617
617
|
headers: { 'Content-Type': 'application/json' },
|
|
618
|
-
body: JSON.stringify({ messages, system,
|
|
618
|
+
body: JSON.stringify({ messages, system, effort, provider, model, webSearch, stream: true }),
|
|
619
619
|
signal
|
|
620
620
|
});
|
|
621
621
|
if (resp.status === 403) throw new Error((await resp.text().catch(() => '')) || 'tb.ai() is blocked \u2014 re-run with --trust');
|
package/package.json
CHANGED