Merge branch 'worktree-iso-phase-4' into macros
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
// =========================================================================
|
||||
|
||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||
var SX_VERSION = "2026-03-07T09:40:17Z";
|
||||
var SX_VERSION = "2026-03-07T09:51:42Z";
|
||||
|
||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||
@@ -4328,10 +4328,24 @@ callExpr.push(dictGet(kwargs, k)); } }
|
||||
return asyncRenderChildren(exprs, env, null);
|
||||
}
|
||||
|
||||
// IO proxy cache: key → { value, expires }
|
||||
var _ioCache = {};
|
||||
var IO_CACHE_TTL = 300000; // 5 minutes
|
||||
|
||||
// Register a server-proxied IO primitive: fetches from /sx/io/<name>
|
||||
// Uses GET for short args, POST for long payloads (URL length safety).
|
||||
// Results are cached client-side by (name + args) with a TTL.
|
||||
function registerProxiedIo(name) {
|
||||
registerIoPrimitive(name, function(args, kwargs) {
|
||||
// Cache key: name + serialized args
|
||||
var cacheKey = name;
|
||||
for (var ci = 0; ci < args.length; ci++) cacheKey += " | ||||