typebulb 0.18.6 → 0.19.0

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/render.js CHANGED
@@ -589,12 +589,13 @@ 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, reasoning, provider, model, webSearch, signal } = {}) => {
592
+ const aiCall = async ({ messages, system, effort, reasoning, 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, reasoning, provider, model, webSearch }),
597
+ // 'reasoning' is the deprecated alias for 'effort'
598
+ body: JSON.stringify({ messages, system, effort: effort ?? reasoning, provider, model, webSearch }),
598
599
  signal
599
600
  });
600
601
  if (resp.status === 403) throw new Error((await resp.text().catch(() => '')) || 'tb.ai() is blocked \u2014 re-run with --trust');
@@ -611,11 +612,12 @@ const something = require('module-name') // NOT SUPPORTED!
611
612
  // streaming tb.server.<gen>(). Break the loop (or abort the signal) to cancel.
612
613
  const aiStream = (opts = {}) => (async function* () {
613
614
  if (isEmbedded) throw embedErr('tb.ai.stream()');
614
- const { messages, system, reasoning, provider, model, webSearch, signal } = opts;
615
+ const { messages, system, effort, reasoning, provider, model, webSearch, signal } = opts;
615
616
  const resp = await fetch('/__ai', {
616
617
  method: 'POST',
617
618
  headers: { 'Content-Type': 'application/json' },
618
- body: JSON.stringify({ messages, system, reasoning, provider, model, webSearch, stream: true }),
619
+ // 'reasoning' is the deprecated alias for 'effort'
620
+ body: JSON.stringify({ messages, system, effort: effort ?? reasoning, provider, model, webSearch, stream: true }),
619
621
  signal
620
622
  });
621
623
  if (resp.status === 403) throw new Error((await resp.text().catch(() => '')) || 'tb.ai() is blocked \u2014 re-run with --trust');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typebulb",
3
- "version": "0.18.6",
3
+ "version": "0.19.0",
4
4
  "description": "Typebulb CLI to run single-file markdown apps called bulbs, either as standalone web apps or embedded in agent responses.",
5
5
  "license": "MIT",
6
6
  "repository": {