@cloudflare/think 0.15.1 → 0.17.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/README.md +51 -44
- package/dist/{chat-sdk-iuBa-CGM.js → chat-sdk-C8BvREXn.js} +16 -9
- package/dist/chat-sdk-C8BvREXn.js.map +1 -0
- package/dist/{index-s3Pl812H.d.ts → index-B7zEkBBM.d.ts} +138 -124
- package/dist/messengers/index.d.ts +15 -17
- package/dist/messengers/index.js +2 -2
- package/dist/messengers/telegram.d.ts +1 -1
- package/dist/messengers/telegram.js +1 -1
- package/dist/think.d.ts +1 -1
- package/dist/think.js +52 -39
- package/dist/think.js.map +1 -1
- package/dist/tools/workspace.js +13 -1
- package/dist/tools/workspace.js.map +1 -1
- package/dist/workflows.d.ts +1 -1
- package/docs/index.md +52 -493
- package/docs/lifecycle-hooks.md +24 -0
- package/docs/sub-agents.md +7 -19
- package/docs/tools.md +3 -3
- package/package.json +6 -39
- package/dist/chat-sdk-iuBa-CGM.js.map +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -1304
- package/dist/cli/index.js.map +0 -1
- package/dist/codegen-DlA2QQuU.js +0 -109
- package/dist/codegen-DlA2QQuU.js.map +0 -1
- package/dist/config-CD7hqncK.d.ts +0 -71
- package/dist/framework/index.d.ts +0 -170
- package/dist/framework/index.js +0 -4
- package/dist/manifest-DK5HuGga.d.ts +0 -141
- package/dist/project-BHurFdu4.js +0 -685
- package/dist/project-BHurFdu4.js.map +0 -1
- package/dist/server-entry.d.ts +0 -120
- package/dist/server-entry.js +0 -266
- package/dist/server-entry.js.map +0 -1
- package/dist/studio/assets/abap-CLvhMVsD.js +0 -1
- package/dist/studio/assets/actionscript-3--17pq3dv.js +0 -1
- package/dist/studio/assets/ada-C5qYipkI.js +0 -1
- package/dist/studio/assets/andromeeda-vGVdxbeo.js +0 -1
- package/dist/studio/assets/angular-html-B26lsrRw.js +0 -1
- package/dist/studio/assets/angular-ts-B0BTTyHo.js +0 -1
- package/dist/studio/assets/apache-U0d_L8uA.js +0 -1
- package/dist/studio/assets/apex-CGTLDQj6.js +0 -1
- package/dist/studio/assets/apl-W5hJk0fj.js +0 -1
- package/dist/studio/assets/applescript-CCn79oCD.js +0 -1
- package/dist/studio/assets/ara-4CJ0cIlV.js +0 -1
- package/dist/studio/assets/asciidoc-DE70LPWp.js +0 -1
- package/dist/studio/assets/asm-Cmm7eHzH.js +0 -1
- package/dist/studio/assets/astro-ChkXCqsA.js +0 -1
- package/dist/studio/assets/aurora-x-CDeNXAV0.js +0 -1
- package/dist/studio/assets/awk-BWXHIvNe.js +0 -1
- package/dist/studio/assets/ayu-dark-DluEY0Gj.js +0 -1
- package/dist/studio/assets/ayu-light-C3h-C4tm.js +0 -1
- package/dist/studio/assets/ayu-mirage-Bqwy1Gya.js +0 -1
- package/dist/studio/assets/ballerina-B7ZEbQpA.js +0 -1
- package/dist/studio/assets/bat-Bo4NYOV-.js +0 -1
- package/dist/studio/assets/beancount-D-usSTwE.js +0 -1
- package/dist/studio/assets/berry-DKpUyyne.js +0 -1
- package/dist/studio/assets/bibtex-Ci_nEsc7.js +0 -1
- package/dist/studio/assets/bicep-CUHmPFLl.js +0 -1
- package/dist/studio/assets/bird2-C2hNVINV.js +0 -1
- package/dist/studio/assets/blade-Dy0zTtr6.js +0 -1
- package/dist/studio/assets/bsl-BkkzgIyY.js +0 -1
- package/dist/studio/assets/c-DOHYbsuN.js +0 -1
- package/dist/studio/assets/c3-CnJL0r0V.js +0 -1
- package/dist/studio/assets/cadence-CQ2zXKGN.js +0 -1
- package/dist/studio/assets/cairo-DLTphjLi.js +0 -1
- package/dist/studio/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/studio/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/studio/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/studio/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/studio/assets/clarity-SemFz856.js +0 -1
- package/dist/studio/assets/clojure-DqKBuwfJ.js +0 -1
- package/dist/studio/assets/cmake-Bj61d0ZC.js +0 -1
- package/dist/studio/assets/cobol-DtGo7U_-.js +0 -1
- package/dist/studio/assets/codeowners-C8r90Shi.js +0 -1
- package/dist/studio/assets/codeql-oeQT6MSM.js +0 -1
- package/dist/studio/assets/coffee-Uf9fkZqI.js +0 -1
- package/dist/studio/assets/common-lisp-Cv5bFMCO.js +0 -1
- package/dist/studio/assets/coq-BrsZFFmf.js +0 -1
- package/dist/studio/assets/cpp-CVwmol0l.js +0 -1
- package/dist/studio/assets/crystal-ChHObCtF.js +0 -1
- package/dist/studio/assets/csharp-Ct8U2NOr.js +0 -1
- package/dist/studio/assets/css-DYjZAj5w.js +0 -1
- package/dist/studio/assets/csv-Dx-8-gkx.js +0 -1
- package/dist/studio/assets/cue-CE9AQfxI.js +0 -1
- package/dist/studio/assets/cypher-ClKdZ_lG.js +0 -1
- package/dist/studio/assets/d-qD-0Kul2.js +0 -1
- package/dist/studio/assets/dark-plus-Cs2F2srj.js +0 -1
- package/dist/studio/assets/dart-DkHntEIa.js +0 -1
- package/dist/studio/assets/dax-BkyTk9wS.js +0 -1
- package/dist/studio/assets/desktop-Dlh5hvp9.js +0 -1
- package/dist/studio/assets/diff-woXpYk--.js +0 -1
- package/dist/studio/assets/docker-IyjqRm3v.js +0 -1
- package/dist/studio/assets/dotenv-_5a1GRtc.js +0 -1
- package/dist/studio/assets/dracula-BHWKrbxM.js +0 -1
- package/dist/studio/assets/dracula-soft-5eyTD99u.js +0 -1
- package/dist/studio/assets/dream-maker-DW3nJb8Q.js +0 -1
- package/dist/studio/assets/edge-C2J43zbu.js +0 -1
- package/dist/studio/assets/elixir-B7WZ8XhB.js +0 -1
- package/dist/studio/assets/elm-PN4qGuR2.js +0 -1
- package/dist/studio/assets/emacs-lisp-C9PiwqqW.js +0 -1
- package/dist/studio/assets/erb-CkbjE2OZ.js +0 -1
- package/dist/studio/assets/erlang-Cphh6RMH.js +0 -1
- package/dist/studio/assets/everforest-dark-sB-x3p7T.js +0 -1
- package/dist/studio/assets/everforest-light-Df2xbC6M.js +0 -1
- package/dist/studio/assets/fennel-DQxkIbk2.js +0 -1
- package/dist/studio/assets/fish-BJitypiv.js +0 -1
- package/dist/studio/assets/fluent-C03EYrpw.js +0 -1
- package/dist/studio/assets/fortran-fixed-form-DEKoE2YW.js +0 -1
- package/dist/studio/assets/fortran-free-form-CYNrtFtB.js +0 -1
- package/dist/studio/assets/fsharp-D13ZGOAj.js +0 -1
- package/dist/studio/assets/gdresource-C0sCabJj.js +0 -1
- package/dist/studio/assets/gdscript-Cp2uCuqX.js +0 -1
- package/dist/studio/assets/gdshader-CBce3t8t.js +0 -1
- package/dist/studio/assets/genie-CV2tkWYe.js +0 -1
- package/dist/studio/assets/gherkin-DExj1W_8.js +0 -1
- package/dist/studio/assets/git-commit-BSykSTBG.js +0 -1
- package/dist/studio/assets/git-rebase-CsGmQhFO.js +0 -1
- package/dist/studio/assets/github-dark-C-LZuMrd.js +0 -1
- package/dist/studio/assets/github-dark-default-DXG-b-1a.js +0 -1
- package/dist/studio/assets/github-dark-dimmed-Bx1FflLF.js +0 -1
- package/dist/studio/assets/github-dark-high-contrast-B_tTalzw.js +0 -1
- package/dist/studio/assets/github-light-EUqPIrTm.js +0 -1
- package/dist/studio/assets/github-light-default-BXViO-2h.js +0 -1
- package/dist/studio/assets/github-light-high-contrast-B68TUdTA.js +0 -1
- package/dist/studio/assets/gleam-CSRkHgEL.js +0 -1
- package/dist/studio/assets/glimmer-js-D85-ZYXa.js +0 -1
- package/dist/studio/assets/glimmer-ts-B_0SLVPe.js +0 -1
- package/dist/studio/assets/glsl-BE5n0T0t.js +0 -1
- package/dist/studio/assets/gn-ilITqXS6.js +0 -1
- package/dist/studio/assets/gnuplot-7GGW24-e.js +0 -1
- package/dist/studio/assets/go-BJwz_mda.js +0 -1
- package/dist/studio/assets/graphql-BVcCJEBO.js +0 -1
- package/dist/studio/assets/groovy-CacY0gHj.js +0 -1
- package/dist/studio/assets/gruvbox-dark-hard-C820rvS2.js +0 -1
- package/dist/studio/assets/gruvbox-dark-medium-BPjhmG05.js +0 -1
- package/dist/studio/assets/gruvbox-dark-soft-MrdJrrXF.js +0 -1
- package/dist/studio/assets/gruvbox-light-hard-BC_s9l72.js +0 -1
- package/dist/studio/assets/gruvbox-light-medium-BAWPOn9u.js +0 -1
- package/dist/studio/assets/gruvbox-light-soft-BSMLrYjP.js +0 -1
- package/dist/studio/assets/hack-CyUu15_C.js +0 -1
- package/dist/studio/assets/haml-Dj54pugT.js +0 -1
- package/dist/studio/assets/handlebars-l3llPaCT.js +0 -1
- package/dist/studio/assets/haskell-D8IpX4py.js +0 -1
- package/dist/studio/assets/haxe-OTjmBuCE.js +0 -1
- package/dist/studio/assets/hcl-Dh228itO.js +0 -1
- package/dist/studio/assets/highlighted-body-OFNGDK62-D_z62he-.js +0 -1
- package/dist/studio/assets/hjson-CxZEssPk.js +0 -1
- package/dist/studio/assets/hlsl-Cvrh5tZx.js +0 -1
- package/dist/studio/assets/horizon-CE9ld1lL.js +0 -1
- package/dist/studio/assets/horizon-bright-Br1oVSNq.js +0 -1
- package/dist/studio/assets/houston-CsvMBhTu.js +0 -1
- package/dist/studio/assets/html--Tmh4628.js +0 -1
- package/dist/studio/assets/html-derivative-B0Q_m8BM.js +0 -1
- package/dist/studio/assets/http-BXKW9YQL.js +0 -1
- package/dist/studio/assets/hurl-C60QjgUE.js +0 -1
- package/dist/studio/assets/hxml-B0Qn7Nwc.js +0 -1
- package/dist/studio/assets/hy-CZbG8q4J.js +0 -1
- package/dist/studio/assets/imba-DsUTQ-LC.js +0 -1
- package/dist/studio/assets/index-Cd4PgOFu.js +0 -390
- package/dist/studio/assets/index-DkGWw6ES.css +0 -2
- package/dist/studio/assets/ini-B5eOa1yu.js +0 -1
- package/dist/studio/assets/java-aXeLcVht.js +0 -1
- package/dist/studio/assets/javascript-BQcRH4fE.js +0 -1
- package/dist/studio/assets/jinja-DGNUkEt-.js +0 -1
- package/dist/studio/assets/jison-DwfSvoKv.js +0 -1
- package/dist/studio/assets/json-B0ukOVyl.js +0 -1
- package/dist/studio/assets/json5-BR5RXkoi.js +0 -1
- package/dist/studio/assets/jsonc-CYpm1nAK.js +0 -1
- package/dist/studio/assets/jsonl-CmCQp5Yx.js +0 -1
- package/dist/studio/assets/jsonnet-CJTPZ8u_.js +0 -1
- package/dist/studio/assets/jssm-DXw9l8Rf.js +0 -1
- package/dist/studio/assets/jsx-CzJUnsSO.js +0 -1
- package/dist/studio/assets/julia-D8zt_FEP.js +0 -1
- package/dist/studio/assets/just-nn4e9Gpd.js +0 -1
- package/dist/studio/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/studio/assets/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/studio/assets/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/studio/assets/kdl-CsD5j6eV.js +0 -1
- package/dist/studio/assets/kotlin-DhhofPvG.js +0 -1
- package/dist/studio/assets/kusto-BUv0MjJC.js +0 -1
- package/dist/studio/assets/laserwave-C_8bwKvT.js +0 -1
- package/dist/studio/assets/latex-OBwqlec5.js +0 -1
- package/dist/studio/assets/lean-CewbzKMR.js +0 -1
- package/dist/studio/assets/less-DVTAwKKz.js +0 -1
- package/dist/studio/assets/light-plus-DVQuIRkW.js +0 -1
- package/dist/studio/assets/liquid-CktG-Iuw.js +0 -1
- package/dist/studio/assets/llvm-Cm23YOpf.js +0 -1
- package/dist/studio/assets/log-BNLmms1o.js +0 -1
- package/dist/studio/assets/logo-Cluzi2Zq.js +0 -1
- package/dist/studio/assets/lua-ZqavSetL.js +0 -1
- package/dist/studio/assets/luau-CNKltnaQ.js +0 -1
- package/dist/studio/assets/make-Dixweg8N.js +0 -1
- package/dist/studio/assets/markdown-BYOwaDjH.js +0 -1
- package/dist/studio/assets/marko-CxDLRfNz.js +0 -1
- package/dist/studio/assets/material-theme-Bm3Qr25_.js +0 -1
- package/dist/studio/assets/material-theme-darker-2IIEA8gg.js +0 -1
- package/dist/studio/assets/material-theme-lighter-uhdI0v04.js +0 -1
- package/dist/studio/assets/material-theme-ocean-CHQ94UKr.js +0 -1
- package/dist/studio/assets/material-theme-palenight-B5W6OYN7.js +0 -1
- package/dist/studio/assets/matlab-D7qyCx1q.js +0 -1
- package/dist/studio/assets/mdc-COZbBQqS.js +0 -1
- package/dist/studio/assets/mdx-DQZ5AkYe.js +0 -1
- package/dist/studio/assets/mermaid-Bk4SNUv9.js +0 -1
- package/dist/studio/assets/mermaid-GHXKKRXX-ChY6AJ7l.js +0 -1
- package/dist/studio/assets/min-dark-BSWPekZh.js +0 -1
- package/dist/studio/assets/min-light-DDpmG2fV.js +0 -1
- package/dist/studio/assets/mipsasm-BMqwQI7S.js +0 -1
- package/dist/studio/assets/mojo-BgCJLMeH.js +0 -1
- package/dist/studio/assets/monokai-CdkpiU2Y.js +0 -1
- package/dist/studio/assets/moonbit-CaWjb8XO.js +0 -1
- package/dist/studio/assets/move-B1IS1UjX.js +0 -1
- package/dist/studio/assets/narrat-_X_XdTYD.js +0 -1
- package/dist/studio/assets/nextflow-Bbiyy34d.js +0 -1
- package/dist/studio/assets/nextflow-groovy-Dc_ddanL.js +0 -1
- package/dist/studio/assets/nginx-DB8A8-iZ.js +0 -1
- package/dist/studio/assets/night-owl-DhmEMT88.js +0 -1
- package/dist/studio/assets/night-owl-light-eJ-hLW7d.js +0 -1
- package/dist/studio/assets/nim-Cs5VB9QZ.js +0 -1
- package/dist/studio/assets/nix-IvuFDN5E.js +0 -1
- package/dist/studio/assets/nord-Cb4Vim4T.js +0 -1
- package/dist/studio/assets/nushell-DcLAeLz5.js +0 -1
- package/dist/studio/assets/objective-c-D1A_Heim.js +0 -1
- package/dist/studio/assets/objective-cpp-BsSzOQcm.js +0 -1
- package/dist/studio/assets/ocaml-O90oeIOV.js +0 -1
- package/dist/studio/assets/odin-B1RWQWA5.js +0 -1
- package/dist/studio/assets/one-dark-pro-CLwyXe_n.js +0 -1
- package/dist/studio/assets/one-light-D7Lr4KcI.js +0 -1
- package/dist/studio/assets/openscad-BUDT5pXO.js +0 -1
- package/dist/studio/assets/pascal-4ZHwLPI5.js +0 -1
- package/dist/studio/assets/perl-pV-3Dli_.js +0 -1
- package/dist/studio/assets/php-CFSq0mhc.js +0 -1
- package/dist/studio/assets/pkl-ot-7Btpt.js +0 -1
- package/dist/studio/assets/plastic-DQwYfKfQ.js +0 -1
- package/dist/studio/assets/plsql-DGHpHOYJ.js +0 -1
- package/dist/studio/assets/po-BiJDBrnU.js +0 -1
- package/dist/studio/assets/poimandres-DRFjx7u4.js +0 -1
- package/dist/studio/assets/polar-C7UOKdEL.js +0 -1
- package/dist/studio/assets/postcss-BXeXVLqQ.js +0 -1
- package/dist/studio/assets/powerquery-DNMTfnFr.js +0 -1
- package/dist/studio/assets/powershell-DshXNtvi.js +0 -1
- package/dist/studio/assets/prisma-BsRQq5mF.js +0 -1
- package/dist/studio/assets/prolog-iXnhIJG7.js +0 -1
- package/dist/studio/assets/proto-DB4EqR-F.js +0 -1
- package/dist/studio/assets/pug-DuCfu-AK.js +0 -1
- package/dist/studio/assets/puppet-CDv2pdJW.js +0 -1
- package/dist/studio/assets/purescript-9MfHhQsQ.js +0 -1
- package/dist/studio/assets/python-gzcpVVnB.js +0 -1
- package/dist/studio/assets/qml-Gqte1OeW.js +0 -1
- package/dist/studio/assets/qmldir-DCQb3MpD.js +0 -1
- package/dist/studio/assets/qss-Fe1Jh2GI.js +0 -1
- package/dist/studio/assets/r-B8XqafmU.js +0 -1
- package/dist/studio/assets/racket-DcIDlBhZ.js +0 -1
- package/dist/studio/assets/raku-B3gFvitq.js +0 -1
- package/dist/studio/assets/razor-HyK7qWun.js +0 -1
- package/dist/studio/assets/red-CJ3rzSJv.js +0 -1
- package/dist/studio/assets/reg-CRGYupPL.js +0 -1
- package/dist/studio/assets/regexp-Bdipf9Ks.js +0 -1
- package/dist/studio/assets/rel-BtDbiS_P.js +0 -1
- package/dist/studio/assets/riscv-Ckw8ddFX.js +0 -1
- package/dist/studio/assets/ron-VUp2lXgN.js +0 -1
- package/dist/studio/assets/rose-pine-BthvhNj6.js +0 -1
- package/dist/studio/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/studio/assets/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/studio/assets/rosmsg-CAekHB0j.js +0 -1
- package/dist/studio/assets/rst-DtdOQB-0.js +0 -1
- package/dist/studio/assets/ruby-DOExsDws.js +0 -1
- package/dist/studio/assets/rust-Cfkwpbl8.js +0 -1
- package/dist/studio/assets/sas-BLRRJVWF.js +0 -1
- package/dist/studio/assets/sass-DXrisJhu.js +0 -1
- package/dist/studio/assets/scala-DKOlJaKm.js +0 -1
- package/dist/studio/assets/scheme-DQCgrYNe.js +0 -1
- package/dist/studio/assets/scss-BILH_sWZ.js +0 -1
- package/dist/studio/assets/sdbl-bTVj8UrX.js +0 -1
- package/dist/studio/assets/shaderlab-TOUzSsQk.js +0 -1
- package/dist/studio/assets/shellscript-CC2KTOv4.js +0 -1
- package/dist/studio/assets/shellsession-CiGs-_qT.js +0 -1
- package/dist/studio/assets/slack-dark-DnToyrRv.js +0 -1
- package/dist/studio/assets/slack-ochin-B2OO5cIa.js +0 -1
- package/dist/studio/assets/smalltalk-B16xEiuN.js +0 -1
- package/dist/studio/assets/snazzy-light-4G7pJPwS.js +0 -1
- package/dist/studio/assets/solarized-dark-DV17i1UV.js +0 -1
- package/dist/studio/assets/solarized-light-DSh2HLQt.js +0 -1
- package/dist/studio/assets/solidity-CKzVLygQ.js +0 -1
- package/dist/studio/assets/soy-QSSlYQhf.js +0 -1
- package/dist/studio/assets/sparql-D_iOobhT.js +0 -1
- package/dist/studio/assets/splunk-BC2Px7Mm.js +0 -1
- package/dist/studio/assets/sql-CPD_IP3i.js +0 -1
- package/dist/studio/assets/ssh-config-BgfXC-Er.js +0 -1
- package/dist/studio/assets/stata-jhUDP248.js +0 -1
- package/dist/studio/assets/stylus-B6D30XZt.js +0 -1
- package/dist/studio/assets/surrealql-CEI1vHaO.js +0 -1
- package/dist/studio/assets/svelte-BqMghnvQ.js +0 -1
- package/dist/studio/assets/swift-DonLKvLd.js +0 -1
- package/dist/studio/assets/synthwave-84-nFMaYfgc.js +0 -1
- package/dist/studio/assets/system-verilog-DJ5XKQeo.js +0 -1
- package/dist/studio/assets/systemd-BxMlprV5.js +0 -1
- package/dist/studio/assets/talonscript-CohzipZa.js +0 -1
- package/dist/studio/assets/tasl-DMoTqEGO.js +0 -1
- package/dist/studio/assets/tcl-CZd0xW_V.js +0 -1
- package/dist/studio/assets/templ-DhMt3Gd_.js +0 -1
- package/dist/studio/assets/terraform-DswuEJGm.js +0 -1
- package/dist/studio/assets/tex-B2oLGu4M.js +0 -1
- package/dist/studio/assets/tokyo-night-oM2G3aXe.js +0 -1
- package/dist/studio/assets/toml-CcmNWLt0.js +0 -1
- package/dist/studio/assets/ts-tags-DbXbAuWo.js +0 -1
- package/dist/studio/assets/tsv-sltzmVWM.js +0 -1
- package/dist/studio/assets/tsx-BWdjt-eB.js +0 -1
- package/dist/studio/assets/turtle-ByJddavk.js +0 -1
- package/dist/studio/assets/twig-b7sZE9-Z.js +0 -1
- package/dist/studio/assets/typescript-B5gQukXY.js +0 -1
- package/dist/studio/assets/typespec-B88KGewJ.js +0 -1
- package/dist/studio/assets/typst-DI99ib-x.js +0 -1
- package/dist/studio/assets/v-DETTlOr0.js +0 -1
- package/dist/studio/assets/vala-zf12oZj6.js +0 -1
- package/dist/studio/assets/vb-Djn5o6TS.js +0 -1
- package/dist/studio/assets/verilog-CiiDBU1e.js +0 -1
- package/dist/studio/assets/vesper-D5bVUKB1.js +0 -1
- package/dist/studio/assets/vhdl-BroJfC0k.js +0 -1
- package/dist/studio/assets/viml-DvXPmvsu.js +0 -1
- package/dist/studio/assets/vitesse-black-fwtXNY1n.js +0 -1
- package/dist/studio/assets/vitesse-dark-BZCL-v6S.js +0 -1
- package/dist/studio/assets/vitesse-light-VbXTXTou.js +0 -1
- package/dist/studio/assets/vue-DGv3yRD9.js +0 -1
- package/dist/studio/assets/vue-html-Cx5Ph-Io.js +0 -1
- package/dist/studio/assets/vue-vine-G05O51ag.js +0 -1
- package/dist/studio/assets/vyper-CgoNMtux.js +0 -1
- package/dist/studio/assets/wasm-BnjxR4X6.js +0 -1
- package/dist/studio/assets/wasm-ByWQv1Qj.js +0 -1
- package/dist/studio/assets/wenyan-C8pVoKbM.js +0 -1
- package/dist/studio/assets/wgsl-BsKzXJz4.js +0 -1
- package/dist/studio/assets/wikitext-ClFFjSW2.js +0 -1
- package/dist/studio/assets/wit-DdvCle-K.js +0 -1
- package/dist/studio/assets/wolfram-DLL8P-h_.js +0 -1
- package/dist/studio/assets/xml-Bd8eSLdt.js +0 -1
- package/dist/studio/assets/xsl-DVLXYJQL.js +0 -1
- package/dist/studio/assets/yaml-CO0sPwby.js +0 -1
- package/dist/studio/assets/zenscript-BnlCZFoB.js +0 -1
- package/dist/studio/assets/zig-CMLA9XwU.js +0 -1
- package/dist/studio/index.html +0 -23
- package/dist/types-codegen-C-9yeFao.js +0 -101
- package/dist/types-codegen-C-9yeFao.js.map +0 -1
- package/dist/vite.d.ts +0 -46
- package/dist/vite.js +0 -193
- package/dist/vite.js.map +0 -1
package/dist/think.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as _classPrivateFieldSet2, i as _classPrivateFieldGet2, n as sanitize
|
|
|
2
2
|
import { createWorkspaceTools } from "./tools/workspace.js";
|
|
3
3
|
import { createFetchTools } from "./tools/fetch.js";
|
|
4
4
|
import { truncatePausedExecutionOutput } from "./tools/execute.js";
|
|
5
|
-
import { t as ThinkMessengerRuntime } from "./chat-sdk-
|
|
5
|
+
import { t as ThinkMessengerRuntime } from "./chat-sdk-C8BvREXn.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import * as aiSdk from "ai";
|
|
8
8
|
import { convertToModelMessages, hasToolCall, jsonSchema, stepCountIs, tool } from "ai";
|
|
@@ -805,6 +805,22 @@ const THINK_WORKFLOW_PROMPT_METADATA_KEY = "__thinkWorkflowPrompt";
|
|
|
805
805
|
* client-supplied messages at intake so a client can never forge them.
|
|
806
806
|
*/
|
|
807
807
|
const RESERVED_MESSAGE_METADATA_KEYS = ["channel", "turnMetadata"];
|
|
808
|
+
/** Stable id prefix for fallback notes that preserve orphaned execution outcomes. */
|
|
809
|
+
const EXECUTION_OUTCOME_MESSAGE_PREFIX = "exec-outcome-";
|
|
810
|
+
/**
|
|
811
|
+
* Present framework-authored execution outcome notes to providers as user
|
|
812
|
+
* context. Think persists these notes as system messages so clients and
|
|
813
|
+
* recovery do not mistake them for human input, but AI SDK v7 and strict
|
|
814
|
+
* providers reject system messages in arbitrary transcript
|
|
815
|
+
* positions. The provider-only projection leaves current and legacy session
|
|
816
|
+
* history unchanged.
|
|
817
|
+
*/
|
|
818
|
+
function toProviderSafeExecutionOutcomeMessage(message) {
|
|
819
|
+
return message.role === "system" && message.id.startsWith(EXECUTION_OUTCOME_MESSAGE_PREFIX) ? {
|
|
820
|
+
...message,
|
|
821
|
+
role: "user"
|
|
822
|
+
} : message;
|
|
823
|
+
}
|
|
808
824
|
/**
|
|
809
825
|
* Reserved name for the synthetic tool a workflow `step.prompt` turn uses to
|
|
810
826
|
* deliver its structured final answer. The agent runs a full multi-step,
|
|
@@ -2460,7 +2476,7 @@ var Think = class Think extends Agent {
|
|
|
2460
2476
|
* head through the exact same pipeline.
|
|
2461
2477
|
*/
|
|
2462
2478
|
async _assembleModelMessages(tools) {
|
|
2463
|
-
const truncated = truncateOlderMessages(await this._repairTranscriptForProvider(this.messages));
|
|
2479
|
+
const truncated = truncateOlderMessages((await this._repairTranscriptForProvider(this.messages)).map(toProviderSafeExecutionOutcomeMessage));
|
|
2464
2480
|
const incompleteAfterRepair = this._incompleteToolCallIds(truncated);
|
|
2465
2481
|
if (incompleteAfterRepair.length > 0) {
|
|
2466
2482
|
console.warn(`[Think] ${incompleteAfterRepair.length} incomplete tool call(s) survived transcript repair and will be dropped by ignoreIncompleteToolCalls: ${incompleteAfterRepair.join(", ")}. This indicates a gap in _repairToolTranscriptParts.`);
|
|
@@ -2743,6 +2759,7 @@ var Think = class Think extends Agent {
|
|
|
2743
2759
|
providerOptions: config.providerOptions,
|
|
2744
2760
|
experimental_telemetry: usesAISDKV7Telemetry ? void 0 : this._turnTelemetry(turnTelemetry),
|
|
2745
2761
|
experimental_transform: config.experimental_transform,
|
|
2762
|
+
experimental_repairToolCall: config.repairToolCall,
|
|
2746
2763
|
output: finalOutput,
|
|
2747
2764
|
abortSignal: input.signal,
|
|
2748
2765
|
prepareStep: (async (event) => {
|
|
@@ -3679,8 +3696,7 @@ var Think = class Think extends Agent {
|
|
|
3679
3696
|
return;
|
|
3680
3697
|
}
|
|
3681
3698
|
};
|
|
3682
|
-
|
|
3683
|
-
else await chatBody();
|
|
3699
|
+
await this._runChatRecoveryFiber(requestId, false, chatBody);
|
|
3684
3700
|
}
|
|
3685
3701
|
});
|
|
3686
3702
|
} finally {
|
|
@@ -5276,7 +5292,7 @@ var Think = class Think extends Agent {
|
|
|
5276
5292
|
if (!this._hasPendingWorkflowNotifications()) return;
|
|
5277
5293
|
this.keepAliveWhile(() => this._drainWorkflowNotifications()).catch((error) => {
|
|
5278
5294
|
console.error("[Think] Failed to drain workflow notifications", error);
|
|
5279
|
-
this.
|
|
5295
|
+
this._rearmWorkflowNotificationAlarm();
|
|
5280
5296
|
});
|
|
5281
5297
|
}
|
|
5282
5298
|
_hasPendingWorkflowNotifications() {
|
|
@@ -5329,22 +5345,26 @@ var Think = class Think extends Agent {
|
|
|
5329
5345
|
} finally {
|
|
5330
5346
|
this._drainingWorkflowNotifications = false;
|
|
5331
5347
|
}
|
|
5332
|
-
await this.
|
|
5348
|
+
await this._rearmWorkflowNotificationAlarm();
|
|
5333
5349
|
}
|
|
5334
|
-
|
|
5350
|
+
_nextWorkflowNotificationAlarm() {
|
|
5335
5351
|
this._ensureWorkflowNotificationTable();
|
|
5336
5352
|
const pending = this.sql`
|
|
5337
|
-
SELECT attempts
|
|
5353
|
+
SELECT attempts, updated_at
|
|
5338
5354
|
FROM cf_think_workflow_notifications
|
|
5339
5355
|
WHERE delivered_at IS NULL
|
|
5340
5356
|
ORDER BY created_at ASC, notification_id ASC
|
|
5341
5357
|
LIMIT 1
|
|
5342
5358
|
`;
|
|
5343
|
-
if (!pending[0]) return;
|
|
5359
|
+
if (!pending[0]) return null;
|
|
5344
5360
|
const delayMs = Math.min(300 * 1e3, 1e3 * 2 ** Math.min(pending[0].attempts, 8));
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5361
|
+
return Math.max(pending[0].updated_at + delayMs, Date.now() + 1);
|
|
5362
|
+
}
|
|
5363
|
+
_getExtensionAlarm() {
|
|
5364
|
+
return this._nextWorkflowNotificationAlarm();
|
|
5365
|
+
}
|
|
5366
|
+
_rearmWorkflowNotificationAlarm() {
|
|
5367
|
+
return this.lifecycle.rearmAlarm();
|
|
5348
5368
|
}
|
|
5349
5369
|
async inspectSubmission(submissionId) {
|
|
5350
5370
|
const row = this._readSubmission(submissionId);
|
|
@@ -5929,8 +5949,7 @@ var Think = class Think extends Agent {
|
|
|
5929
5949
|
return;
|
|
5930
5950
|
}
|
|
5931
5951
|
};
|
|
5932
|
-
|
|
5933
|
-
else await programmaticBody();
|
|
5952
|
+
await this._runChatRecoveryFiber(requestId, false, programmaticBody);
|
|
5934
5953
|
} finally {
|
|
5935
5954
|
if (abortSignal?.aborted) wasAborted = true;
|
|
5936
5955
|
detachExternal();
|
|
@@ -6014,8 +6033,7 @@ var Think = class Think extends Agent {
|
|
|
6014
6033
|
error = streamResult.error;
|
|
6015
6034
|
}
|
|
6016
6035
|
};
|
|
6017
|
-
|
|
6018
|
-
else await continueTurnBody();
|
|
6036
|
+
await this._runChatRecoveryFiber(requestId, true, continueTurnBody);
|
|
6019
6037
|
} finally {
|
|
6020
6038
|
if (abortSignal?.aborted) wasAborted = true;
|
|
6021
6039
|
detachExternal();
|
|
@@ -6079,8 +6097,7 @@ var Think = class Think extends Agent {
|
|
|
6079
6097
|
error = streamResult.error;
|
|
6080
6098
|
}
|
|
6081
6099
|
};
|
|
6082
|
-
|
|
6083
|
-
else await retryTurnBody();
|
|
6100
|
+
await this._runChatRecoveryFiber(requestId, false, retryTurnBody);
|
|
6084
6101
|
} finally {
|
|
6085
6102
|
if (abortSignal?.aborted) wasAborted = true;
|
|
6086
6103
|
detachExternal();
|
|
@@ -6368,8 +6385,7 @@ var Think = class Think extends Agent {
|
|
|
6368
6385
|
return;
|
|
6369
6386
|
}
|
|
6370
6387
|
};
|
|
6371
|
-
|
|
6372
|
-
else await chatTurnBody();
|
|
6388
|
+
await this._runChatRecoveryFiber(requestId, false, chatTurnBody);
|
|
6373
6389
|
}
|
|
6374
6390
|
})).status === "stale") this._broadcastChat({
|
|
6375
6391
|
type: MSG_CHAT_RESPONSE,
|
|
@@ -7465,15 +7481,17 @@ var Think = class Think extends Agent {
|
|
|
7465
7481
|
return output;
|
|
7466
7482
|
}
|
|
7467
7483
|
/**
|
|
7468
|
-
* Replace a paused execute-tool output in the transcript
|
|
7469
|
-
* execution's new outcome and kick the auto-continuation so the
|
|
7470
|
-
* it.
|
|
7484
|
+
* Replace a paused execute-tool or durable-action output in the transcript
|
|
7485
|
+
* with the execution's new outcome and kick the auto-continuation so the
|
|
7486
|
+
* model sees it.
|
|
7471
7487
|
*
|
|
7472
7488
|
* When no paused part carries `executionId` — the output was already
|
|
7473
7489
|
* replaced from another tab, or compaction summarized the part away — the
|
|
7474
7490
|
* runtime has still durably applied the approval/rejection, so the outcome
|
|
7475
|
-
* must not be dropped: it is appended as a system note
|
|
7476
|
-
* continuation still fires so the model can act on it.
|
|
7491
|
+
* must not be dropped: it is appended as a framework-authored system note,
|
|
7492
|
+
* and the continuation still fires so the model can act on it. Provider
|
|
7493
|
+
* assembly projects this narrowly identified note to ordinary user context
|
|
7494
|
+
* without changing its durable authorship.
|
|
7477
7495
|
*/
|
|
7478
7496
|
async _applyExecutionOutcome(executionId, output) {
|
|
7479
7497
|
const toolCallId = this._findPausedExecutionToolCall(executionId);
|
|
@@ -7485,12 +7503,13 @@ var Think = class Think extends Agent {
|
|
|
7485
7503
|
} catch {
|
|
7486
7504
|
summary = String(output);
|
|
7487
7505
|
}
|
|
7506
|
+
const outcomeSource = executionId.startsWith(ACTION_PAUSE_ID_PREFIX) ? "durable action" : "execute tool";
|
|
7488
7507
|
await this._appendMessageToHistory({
|
|
7489
|
-
id:
|
|
7508
|
+
id: `${EXECUTION_OUTCOME_MESSAGE_PREFIX}${executionId}-${crypto.randomUUID()}`,
|
|
7490
7509
|
role: "system",
|
|
7491
7510
|
parts: [{
|
|
7492
7511
|
type: "text",
|
|
7493
|
-
text: `[
|
|
7512
|
+
text: `[${outcomeSource}] The paused execution "${executionId}" was resolved, but its tool call is no longer in the transcript (it may have been compacted). Outcome: ${summary}`
|
|
7494
7513
|
}]
|
|
7495
7514
|
});
|
|
7496
7515
|
} else await this._enqueueInteractionApply(() => this._applyToolUpdateToMessages(pausedExecutionUpdate(toolCallId, executionId, output)));
|
|
@@ -7772,12 +7791,8 @@ var Think = class Think extends Agent {
|
|
|
7772
7791
|
* emits `chat:recovery:exhausted`, marks the submission interrupted, and
|
|
7773
7792
|
* delivers the configured `terminalMessage`). The caller must NOT run the
|
|
7774
7793
|
* generic terminal path — the terminal UX is already delivered.
|
|
7775
|
-
* - `"disabled"` — chat recovery is off; the caller falls through to the
|
|
7776
|
-
* generic terminal error (the watchdog's original "kill the spinner"
|
|
7777
|
-
* behavior, unchanged).
|
|
7778
7794
|
*/
|
|
7779
7795
|
async _routeStallToBoundedRecovery(input) {
|
|
7780
|
-
if (!this._resolveChatRecoveryConfig().enabled) return "disabled";
|
|
7781
7796
|
const recoveryRootRequestId = this._activeChatRecoveryRootRequestId ?? input.requestId;
|
|
7782
7797
|
const latestUserMessageId = [...this.messages].reverse().find((m) => m.role === "user")?.id ?? null;
|
|
7783
7798
|
const { incident, config, exhausted } = await this._beginChatRecoveryIncident({
|
|
@@ -7943,13 +7958,13 @@ var Think = class Think extends Agent {
|
|
|
7943
7958
|
});
|
|
7944
7959
|
else if (options.continue === false && !streamIsTerminal) {
|
|
7945
7960
|
await this._updateChatRecoveryIncident(incident.incidentId, "skipped", "continue_disabled");
|
|
7946
|
-
const
|
|
7947
|
-
await this._markRecoveredSubmissionInterrupted(recoveryRootRequestId,
|
|
7948
|
-
await this._recordTerminalChatStatus("interrupted", requestId,
|
|
7961
|
+
const declinedMessage = "Submission was interrupted and automatic continuation was declined.";
|
|
7962
|
+
await this._markRecoveredSubmissionInterrupted(recoveryRootRequestId, declinedMessage);
|
|
7963
|
+
await this._recordTerminalChatStatus("interrupted", requestId, declinedMessage);
|
|
7949
7964
|
this._broadcastChat({
|
|
7950
7965
|
type: MSG_CHAT_RESPONSE,
|
|
7951
7966
|
id: requestId,
|
|
7952
|
-
body:
|
|
7967
|
+
body: declinedMessage,
|
|
7953
7968
|
done: true,
|
|
7954
7969
|
error: true
|
|
7955
7970
|
});
|
|
@@ -8495,8 +8510,7 @@ var Think = class Think extends Agent {
|
|
|
8495
8510
|
streamed = true;
|
|
8496
8511
|
}
|
|
8497
8512
|
};
|
|
8498
|
-
|
|
8499
|
-
else await continuationBody();
|
|
8513
|
+
await this._runChatRecoveryFiber(requestId, true, continuationBody);
|
|
8500
8514
|
} finally {
|
|
8501
8515
|
this._aborts.remove(requestId);
|
|
8502
8516
|
if (!streamed) this._continuation.sendResumeNone();
|
|
@@ -8552,8 +8566,7 @@ var Think = class Think extends Agent {
|
|
|
8552
8566
|
}));
|
|
8553
8567
|
if (result) await this._streamResult(requestId, result, abortSignal, { continuation: true });
|
|
8554
8568
|
};
|
|
8555
|
-
|
|
8556
|
-
else await continuationBody();
|
|
8569
|
+
await this._runChatRecoveryFiber(requestId, true, continuationBody);
|
|
8557
8570
|
}
|
|
8558
8571
|
});
|
|
8559
8572
|
} catch (error) {
|