Releases: duso-org/duso
v0.23.3-342
Description
More love for http_server:
- Logging
- RSA256
- Cache control
- Limit-based request blocking
Some improvements to datastore, and general quality of life.
Full Changelog: v0.22.16-331...v0.23.3-342
Fixes
- Moved TTL tickers for
datastorekeys to inside the datastore's struct (internal) - Removed
datastore().wait_for(), and instead changedwait()by adding an optional function value that runs when the value of the key changes and evaluates to true/false if it's what we're waiting for
Features
- Add Apache-style logging to
http_server(configurable) - Add reasonable (configurable) limits to
http_serverto reduce abusive requests - Add cache control to static routes in
http_server - Add websocket to
http_serversetup with.route("WS", ...)handler script instances control their own lifecycle for each open websocket - Add RSA256 sign/verfy builtins
sign_rsa()and `verify_rsa() - Add RSA-based JWT auth support to
http_serverwithsign_jwt()andverify_jwt() - Add MacOS Package installer! Handles both Silicon and Intel Macs. The separate archives still exist, but they were changed from
.tar.gzto.zip. - Add
versionto thesysdatastore. Get current Duso version withsys("version")
Deprecated
datastore().wait_for(key, gofunc)removed functionality moved towait()it wasn't ever working correctly in the first place unless you happened to have a go func sitting around to somehow reference through the duso script file (nope).- Reminder that
require("markdown")and its api have been replaced with the builtins:markdown_html(),markdown_text(), andmarkdown_ansi().
v0.22.16-331
Description
This is a sort of mixed-bag release. Lots of polishing, some crucial bug fixes, and some nice new features:
- solid interpreter performance tweaks (up to 33% faster in weaker areas like tight loops and deep recursion) along with ~15% less cost for concurrent scripts at scale
http_server()got some love: file uploads and bug fixesbinaryfile type added, pretty click, thread-safe and efficient- lots of documentation updates
- several good bug fixes
Full Changelog: v0.21.9-303...v0.22.15-330
Fixes
hash(),encode_base64(),decode_base64(), andlen()all support new binary data typed variables- fix race conditions in the interpreter (didn't notice before because the apps I'm working with use caching w
datastore()and we cache module AST etc. with all the caching off, the race conditions were revealed. we're good now. - fix
format_json()to ignore functions, stringify code, error, and binary (all produce metadata as stringified) - fix
markdowntask lists enabled by default - fix
http_server()static routes returning 500 instead of 404 for not found - fix
http_server()route wildcards not working (eg./docs*was failing but/docs/*was ok) - fix
parallel()to return error values in the return array for any failed processes - fix
parallel()parent scope write access; parent scope is now read-only as intended - fix
http_server()default static route uses/*instead of/(wildcards made this necessary) - fix LSP server not recognizing some builtins inside anonymous functions and other deep structures, and with unary operators preceding them (eg. ! and not)
New Features
- new
binarydata type for images and other blobby byte data, store immutably, globally available, thread-safe, optional metadata on creation; stringifies to its metadata - new
load_binary()andsave_binray()builtins to save/load binary data using the new data type - new
http_server()file uploads: multi-part form, additional config options, simple interface insiderequest(), supports newbinarydata type for, well, binary files - new
kill()builtin will attempt to stop a running script instance (partial implementation several of our other blocking calls aren't looking for the new kill signal, this will roll out full over the next month or so, lots of regression testing along the way) - new
watch()builtin watches filesystem (OS or our VFS) for changes; blocks until a change to specified dir or glob pattern, then returns to allow a script to react to any changes - new
markdown_text()same as the ANSI rendered but no ANSI codes -- basically, it's there to prettify markdown slightly for text-only and also support-no-coloreasily - various performance improvements: removed unnecessary mutex locking (script instances have their own goroutines already), added some improvements to evaluator, found a missing cache issue in http handlers; all told, about 33% speed increase in most areas, still slowest in infinite recursion (each layer is a new goroutine and new interpreter data space, expensive)
Decrecated Feature
stdlib/markdownandmd = require("markdown")is no longer needed, usemarkdown_html(),markdowb_ansi(), andmarkdown_text()moving forward. the module skeleton is still there for compatibility but it'll go away
v0.21.8-303
Decription
This is a pretty big release with lots of improvements and new features. I'm going to start writing proper release notes like this moving forward. Big wins:
- important security features around the built-in HTTP server
- in-app agent-based coding is more powerful and debuggable
- markdown parsing is now a built-in because markdown is used a LOT
- deprecating the markdown module
Full Changelog: v0.19.2-283...v0.21.7-300
Fixes
- fix bug in HTTP handler
.response().json()it was just stringifying whatever you passed in - fix
returnandexit()were triggeringcatch()from insidetryblocks - fix
copy_file()andmove_file()where destination is a local directory (eg. "mydir" looked like a file) - updated docs
Added some missing docs, fixed some issues.
New features
- add
markdown_html()andmarkdown_ansi()builtins - deprecating markdown module
AI eats and drinks markdown. I decided to use our first module outside go's stdlib. Goldmark is an excellent pure go markdown parser. I added an ANSI renderer with basic style theming. Planning to offer it as a separate contribution back to Goldmark.
- add
parse()to parse code into AST - parsed code can be used in
run()andspawn()i place of a filename string - add
codeanderroras new types - add io/err routing for run/spawn to datastore/key (great for agent-in-the-box use cases)
This is part of making it easy to let agents write code inside Duso. A code value contains its source code, parsed AST, and any optional metadata passed in when it was parsed. Caching the AST is a nice performance win for subsequent calls. Metadata helps with tracing the history of a given piece of code, especially for debugging. Being able to route in/out/err for spawned scripts is key to helping in-Duso agents to debug code. Allows routing to a datastore queue.
- add
starts_with()andends_with()
These are just too common to leave out.
- remove CLAUDE.md skill
- simplify AI agent tool use loops
Some general AI improvements.
- add
encode_base64()anddecode_base64() - add
hash_password()andverify_password()for common salted pwds - add
hash()general hashing (sha256, sha512, sh1, md5) - add CORS
- add JWT
.request().jwt_claimsand.response().sign_jwt()
Some much needed things for running robust production servers.
- add Stripe module (not fully tested, beware)
I was on the phone with someone and had Claude code this up in a few minutes. It appears to be the full Stripe API. I only did sanity testing with it. This module is experimental: do not use in production.
v0.19.2-283
- Add module for OpenAI
- Add other OpenAI ecosystem vendors: Ollama, DeepSeek, Azure AI, Groq
- Add auto-print to REPL and interactive debugger
- Sweeping broken doc link fixes
v0.18.23-275
- add
.static(uri, local_path)to let http_server automatically handle static file serving - add default if no routes or static paths are set, http_server will use
.static("/", ".")to serve up cwd - add
directory=booleanto config to turn on basic file listings on directories in static server - add
default="index.htm"ordefault=["index.htm", "index.md", ...]to specify default index file(s) for a given directory in static server - can do
duso -c 'http_server().start()' to serve up cwd on port8080` (can change port in the config) convenient dev web server - add
duso -installto copy duso binary to an OS-level run anywhere location - update install docs
v0.18.19-268
Improved file handling internally. Moved away from path/filepath in favor of path. Keep paths internally set to / separators to keep everything simple. Go's low level IO already resolves to \ on Windows, so we don't need to worry about it in our code. This should be smoother overall, and fix the breakage in Windows.