v0.29.0
·
11 commits
to main
since this release
Minor Changes
- Add
logEventText(event)to the log-events module: one event's plain-text body (what the event says, without colors, tags, timestamps, or stack frames), shared by the CLI line formatter and the dashboard log rows and search. CLI output is byte-identical; this is the extraction of the wording both renderers already produced independently. The platform logs endpoint also retires its never-useduntilquery param — the window always ends at request time, and an explicituntilis ignored (no released client ever sent one). - New
loggableError(err)export (shared, both entries): renders an error as the string form that survives Workers Logs ingestion — the telemetry pipeline keeps only a logged Error OBJECT's stack frames, dropping its message, so uncaught route errors showed indeepspace logsas bare frames. The SDK's own error logs now go through it — the room runtime (BaseRoom/RecordRoom/CronRoom/JobRoom message, task, job, and websocket error logs), Yjs doc loads, the auth glue's Apple-secret/onUserCreated logs, chat compaction, the files quota/multipart paths, and the documentation MCP worker — so those messages come back for every app on upgrade + redeploy. Output is bounded: causes are walked to a fixed depth and the rendered text is capped at the exportedMAX_LOG_TEXT_LENGTH(8 KB, the same budget the platform's log reader truncates at), so a hostile or enormous error can't flood the log store. App code should follow the same rule: logloggableError(err), never a bare Error object. - Remove the opt-in client-side error forwarding subsystem (
installClientErrorReporter,reportClientError,registerClientErrorRoute,handleClientErrorReport,CLIENT_LOG_MARKER, and theClientErrorReport/ClientErrorKind/ClientErrorReporterOptionstypes), and with it thesource: 'client'field onAppLogEventand theCLIENTtag indeepspace logsand the dashboard. Shipped in 0.7.0, it was never wired anywhere — not the scaffold, the skill, or the site manual — so it has been ~900 lines of dormant surface, including an anonymous ingestion endpoint (POST /_deepspace/client-errors) in every app that opted in. Browser JS errors are therefore invisible todeepspace logsagain (they never invoke the Worker); the tenant-safe design is recorded indocs/platform/app-logs.mdand observability gap A7 for resurrection — scaffold-wired by default — if demand appears. Apps that did call the removed APIs must drop those calls when upgrading; reports POSTed by already-deployed apps now surface as plain marker-prefixed log lines instead ofCLIENT-tagged events. - New
workerErrorHandler(prefix, respond?)export (deepspace/worker): the one Honoapp.onError— a response-bearing error (HTTPException) keeps its own answer, everything else is logged as one string ([prefix] METHOD /path: message, frames, bounded cause chain, vialoggableError) and answered with a generic 500 (or the worker's ownrespondshape). The scaffold template and the deploy/auth/platform workers now register it instead of carrying hand-copied handler bodies (api-worker's own handler is the billing owner's area, unchanged). Also exported:truncateLogText(s), the single budget-inclusive, surrogate-safe truncation bothloggableError(write side) and the platform log reader (read side) use — a capped field never exceedsMAX_LOG_TEXT_LENGTHanymore. And--searchnow matches the sharedlogEventTextrendering (the same corpus the dashboard searches and both renderers display), so an exception's name/message and a request's method/path/status match — not just the raw message field.
Patch Changes
logs --followno longer retries a 400 forever. The flags are constant for the life of a tail (a bad--sincealready failed on the first fetch, before the loop), so a mid-tail 400 means the platform stopped accepting a shape it used to — exactly what removing a param does to an older CLI. Resending the identical request cannot succeed; the tail now ends with the error. 429 (the route's own throttle) and 5xx still back off and retry.