* refactor(util): shared helpers for hosts, timeouts, chunking, paging, shutdown flush and codes
Adds normalizeHost/getPuterHostedDomains, withTimeout, chunk, nowSeconds,
isMissingTable, clampLimit/parsePageQuery/pageEnvelope, finalFlush,
parseRetryAfterMs/doublingBackoffMs, randomCode, sweepInBatches,
hashPassword/generateEmailConfirmCode, requestIp and isTemporaryAccount, and
removes util exports nothing called.
* refactor(clients,core): drop unread alarm state and dead shutdown paths, share host helpers
DynamoDB batches still throttled after the retries answer 503 db_unavailable.
* refactor(stores): one cache read per miss, tombstones on every write, batch methods for callers above
The multi-check permission cache is read with pipelined GETs. claimOwnership,
replaceDataUrlIcon and setLabel tombstone their keys. updateMetadata merges in
one statement. App stats reject an unknown period and cap grouped answers.
* refactor(services): fewer serial round trips in permission, share, metering and events paths
checkMany no longer caches a check that threw. Account deletion revokes its
sessions first. OIDC email_verified strings are read as booleans. Events
limits, FS service types and the events worker deployer live under services.
* refactor(drivers): one teardown path for workers, shared credit hold and provider helpers
A URL input and a generated-media download have a deadline and a size cap.
Azure chat clients take the shared client options. xAI and Mistral chat send
tools through toolsToWire and honor apiBaseUrl.
* refactor(controllers): shared download, paging and second-factor helpers, store methods for raw SQL
/batch answers a non-HTTP op error generically and logs it. /fs/search returns
the client entry shape. The unused /puterai/video/proxy route is removed.
* refactor: thumbnails accept raster types only, boot failure exits, docs for new limits
* fix: sessions stay listed after a rename, token grants follow the whole revoke cascade, app delete in one transaction
- listSessions asks the primary about rows marked as changed, so a renamed
session stays on the list under its new label.
- The revoke cascade reports the access tokens it revoked, and their grants
are dropped at any depth. The read before each revoke is gone.
- App delete records the deletion, clears filetype associations and deletes
the row in one transaction.
- A local worker deploy waits for the runtime to start, so a script it cannot
load fails the deploy.
- Speechify plain text: an & that starts no XML entity and a < that starts no
complete tag are escaped.
- The events forward queue's byte bound counts UTF-8 bytes.
- Without a dedicated store, thumbnails stay in the default bucket.
- AppStore.invalidateWrittenByUid for writers that hold the uid.
- subdomainFromHost takes the configured domain list; the sorting wrapper only
tests called is removed.
- Changelog and alarm docs match the code.
* fix: cache pipelines fall back to single commands across shards, TURN records metered one by one, allowance baseline kept
- execTogether runs single-key cache commands in one round trip and, on a
cluster that cannot route them in one pipeline, sends each on its own. The
row cache, tombstone reads and writes, the FS entry backfill, the permission
check cache and the revoked-session cache write use it.
- TURN usage ingestion makes one metering call per user with each record as
its own usage, so one malformed record does not affect the others.
- The allowance settlement keeps the baseline fold for month records without
allowanceUsed.
- Speechify plain text keeps a self-closing tag without attributes.
* fix(localworker): a deploy waits for the runtime to start and a failed cold start answers 502
A script the runtime cannot load fails the deploy. What was serving before
goes back in place, and a first request for such a worker answers 502.
* fix(subdomains): the sites rooted under a folder are read in name order, a page at a time
subdomainsRootedUnder takes the name to start past, so a caller pages
through every match instead of stopping at one query's limit.
* fix(localworker): swap Miniflare instance before disposing previous one and dedupe concurrent cold starts
* test(localworker): restore the service's tests and cover the swap on the real runtime
Brings back the existing LocalWorkerService tests and adds cases for a
request during a redeploy, concurrent first requests, and a retry after a
failed first deploy. The first-request deploy moves into its own method,
and both dispose paths share one helper.
---------
Co-authored-by: U-ITACHII <356922991+U-ITACHII@users.noreply.github.com>
Co-authored-by: Daniel Salazar <daniel.salazar@puter.com>
apps.create and apps.update refuse an index_url on the host of a godmode app. Dev Center points every new app at https://console.puter.com/coming-soon.html until its first deploy, and that page is on Dev Center's own host. That exact URL is now accepted. Any other URL on the host, including the placeholder with a query string or fragment, is still refused.
* fix(puter-js): clear launch params from an app tab's address bar
An app the desktop opens in its own browser tab removes the puter.*
params it was launched with from its URL after load. The app's own
params, utm_* and the hash stay; framed apps are unchanged.
The SDK reads launch items from the query it booted with, so
onLaunchedWithItems() and wasLaunchedWithItems() still see the opened
item after the URL changes.
* fix(puter-js): keep a tab's app id across a reload after the launch params are cleared
A godmode token doesn't name the app, so once the desktop answers a tab's
launch, the app id from the launch URL is stored the way a token's own app
id is.
* fix(hosting): a private app's sign-in page continues with the desktop's token and keeps the opened item
In a tab the desktop opened, the sign-in page waits for the desktop's
handoff, sends the handed token to its own URL in X-Puter-Auth-Token so
the host sets its cookie, then loads the URL the tab was opened at. The
token goes in the URL only after a redirect, a failed request, or on a
click after a header try didn't load the app.
Before leaving, the page keeps the opened item in sessionStorage, bound
to the launch and a fingerprint of the handed token, for 5 minutes. The
app's page takes it when it boots on that token in the same tab.
Reading sessionStorage for it can't stop the SDK from booting where
storage is blocked.
---------
Co-authored-by: Salazareo <25314977+Salazareo@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
isBlockedEmail compared each blocked entry as a raw suffix of the whole
address, so `mailinator.com` also blocked `notmailinator.com` and a TLD
entry like `ru` blocked `site.guru`. A bare entry now matches the
address's domain exactly or as a parent domain. Entries containing `@`
or starting with `.` keep matching as written.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The AI vendor SDKs use plain fetch, and nodeFetchDispatcherGuard gives it
a 10-minute header and body timeout. SDK_TIMEOUT_MS relies on that, but
nothing linked the two values, so raising SDK_TIMEOUT_MS above 10 minutes
would still be cut off at 10 with no error.
The guard now exports OUTBOUND_FETCH_TIMEOUT_MS, and sdkClient.test.ts
checks that SDK_TIMEOUT_MS isn't larger than it. No change in behavior.
No benchmark covered the AI path, so a change could add round trips
to a chat completion's rate limit, concurrency slot, credit gate, hold
or usage record without the comparison noticing.
Four scenarios now run a completion through the real gates and the
real credit hold against a local stand-in for the vendor: streamed and
unstreamed through /drivers/call, for an account on its allowance and
for one with purchased credit, and streamed through the OpenAI chat
completions route.
* test(ai): stream two interleaved tool calls through the compatibility routes
The route tests for the OpenAI chat, Responses and Anthropic messages
routes stub the chat driver, and the HTTP tests that run a fake vendor
through the real driver only stream text. Nothing checked that a
vendor's streamed tool calls reach a client of those routes intact.
A new HTTP test boots the backend, plays Chat Completions, Responses and
Anthropic vendors at the fetch boundary with two tool calls whose
arguments arrive in pieces, interleaved for Chat Completions, and
rebuilds the calls from each route's stream. The fuzz test's healthy
upstream answers a streamed request that offers tools with the same
fixtures, and the misbehaving case offers a tool on half its requests,
so corrupted tool-call streams are exercised too.
* test(ai): review follow-ups for streamed tool-call tests
The fuzz test fed Mistral the piece-by-piece Chat Completions fixture,
which Mistral's SDK rejects because it requires a name on every
tool-call delta, and the fuzz test still passed. Mistral now gets every
call whole in one chunk, the shape it sends, and the HTTP test gains a
Mistral row and a whole-calls row for the OpenAI SDK.
The piece-by-piece fixture now opens each call with empty arguments, as
OpenAI does. The HTTP test also checks that the chat route numbers calls
from 0 and sends a call's id and name only once, that Anthropic blocks
never overlap, and that each route ends its stream the way clients wait
for.
The Anthropic stream writer can have one content block open, and a
tool_use_start for a second call closed the first call's block. Pieces of
the first call that arrived after that were dropped, and its closing
tool_use was skipped as already written, so a client got its input as
truncated JSON whenever an upstream interleaved two calls' arguments.
A call that starts while the open call's input is still incomplete JSON
now waits, collecting its pieces. When the open call ends, its block
closes and the next waiting call opens with the pieces it has so far,
then streams the rest live. A call that starts after the open call's
input is complete closes it and streams live as before, so calls sent one
after the other are not delayed. A whole tool_use that arrives while a
call is open waits the same way, calls without a distinct id never wait,
and calls still waiting when the message ends are written before
message_delta.
* fix(ai): streamed tool calls keep their arguments when an upstream's deltas differ from OpenAI's
The OpenAI-compatible stream handler slotted tool-call deltas by index
alone and appended function.arguments as it arrived. Parallel calls that
shared an index, or sent none, merged into one block whose JSON could not
parse, and the second call was lost. A delta without arguments started the
buffer with "undefined", and object arguments, which Mistral's SDK allows,
became "[object Object]". Each reached the caller as a tool call with
input {}. A delta carrying both content and tool_calls emitted only the
text.
A delta with an index still continues the call at that index, unless it
brings a new id and its own name, which opens another call. A delta with
no index resolves by id, then to the call in progress. Arguments are read
as JSON text, and a delta's tool calls are handled after its text.
Arguments that still don't parse pass as {} as before, and the call's
name, id and length are logged.
* fix(ai): review follow-ups for streamed tool calls
Two calls that shared an index were told apart only when the second one
opened. After that the index pointed at the second call, so a later
delta carrying the first call's id was appended to the second, and both
came back with arguments that don't parse when their pieces alternated.
Each index now remembers the calls opened on it by id, and a delta whose
id matches one of them continues that call. The lookup stays within the
index, so calls at different indexes that repeat an id stay apart.
* fix: decode puter.args once and keep just-revoked sessions off the session list
* fix(socket): a session revoke drops only that session's sockets; the GUI reconnects after a server disconnect
* fix(fs): a write into a folder spelled in another case or form lands under the folder's stored path
* fix(auth): access tokens for fs: scopes accept access held through a parent folder
* docs(changelog): read URLs through folder access and writes into respelled folders
* style: format
* fix: address review — stored paths for created parents, batch alias dedupe, uid-only ACL mint, scoped socket eviction fallback, events suites
* test(fs): build the legacy respelled-descendant rows directly
* fix: address second review — refuse duplicate overwrite targets before upload, reuse ensured folders, check stored path length, match created folders by entry, decode a doubly encoded API origin
* docs(changelog): file this PR's entries under its merge day
Files, Apps, the properties modal and the log-out confirm now use
UIDashboardDialog, mounted in the dashboard window like the Notifications
tab's dialogs. Messages are HTML-encoded at the call site, since the dialog
renders its message as given. Dismissing the name-conflict dialog counts as
Skip or Cancel.
Translates the 652 strings ko.js was missing, updates the 2FA setup
instruction to match the current English, and drops two keys en.js no
longer has plus a duplicated billing key.
The Responses route asks the driver to stream tool input, so every
function call starts with tool_use_start, even from an upstream that
sends the call whole. The route added each call to the response output
with empty arguments and sent the pieces only as
function_call_arguments.delta events. The items in
response.output_item.done and in the output of response.completed kept
arguments "", so a client that reads the finished response rather than
the deltas, such as the OpenAI SDK's finalResponse() or the Agents SDK,
got every streamed tool call with no arguments.
When the call ends, its item now takes the arguments the route collected
for it, before the done events are sent.
The chat driver rebuilt its model listing on every call to models() and
list(): it flattened the model map, visiting each model once per name it
answers to, dropped the repeats, applied the listed rates and sorted.
The map only changes at boot and on the fifteen-minute refresh, and the
routes that serve the listing are public.
The listing is now built when the model map is swapped and both methods
return it. A scheduled price change still takes effect at its instant:
the listing records the span of time its rates hold for and is rebuilt
from the current map on the first call outside that span. The returned
arrays are frozen, since every caller now shares them. What the routes
return is unchanged.
* fix(ai): bill Mistral OCR for a page count a document can have
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(ai): retry a chat credit hold apart from lost headroom when the balance changed
A conditional hold refused because the balance changed since it was read
is now reported as 'stale', separately from one that no longer fits. The
chat gate reads the balance again for it, up to five times with a short
randomized wait, without spending the tries a lost headroom gets, and
refuses with a plain 429 rather than credits_reserved if it never holds
still.
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Daniel Salazar <daniel.salazar@puter.com>
* fix(ai): meter Gemini thoughts and audio input separately
* fix(ai): schedule Gemini legacy redirect pricing
* fix(ai): keep video in Gemini conversations that contain audio
The native Gemini adapter maps video data URLs to inline data for the
models whose audio input it serves, so a conversation with both audio
and video is sent to Google instead of failing with 400.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(ai): meter Gemini audio by content, send video and Puter file audio
Audio and video data URLs count as audio and video input whatever part
carries them, and the input check runs again once Puter files are read.
Gemini 2.5 Flash and Flash-Lite requests with video use the native API
so the audio track is metered at the audio rate. Remote video URLs are
fetched and inlined for Gemini, video reaches the compatible endpoint
in the part it reads, and audio inlined from a Puter file is sent as
bare base64 with a wav or mp3 format. The native adapter answers 400
for a tool call without a function name and no longer fails on a tool
call id or image URL that is not text.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(s3): close pooled connections before S3 drops them
S3 hangs up on a keep-alive connection that has been idle for about 6 s and
sends no keep-alive hint, while the client's pool kept idle sockets
indefinitely. A request written to a socket as S3 closed it failed with
`socket hang up`, and the SDK's retries could draw more sockets of the same
age from the pool and fail the same way.
The pool now closes a socket after 4 s idle. Requests in flight keep the
handler's own socket timeout. Plain-HTTP endpoints get the same pool settings
as HTTPS ones.
* feat(alarms): name the host and a hosted site's owner on HTTP error alarms
A hosted site's visitor is usually anonymous, so an error alarm for a site
request named nobody, and its path alone did not say which site failed. The
site middleware now records the owner as the actor to report a failure
against, used when the request has no actor of its own, and every HTTP error
alarm carries the request host.
A card stands in for the phone step only on an account that neither owes a
card nor has verified one. A number on file is still stood in for by the card
on file. An account that owes both keeps both steps.
`puter.phone-verification.check` gains two optional fields:
- `countsTowardFallback: false` keeps a refused send out of the count that
opens the fallback. Refused sends count by default, as before.
- `refuseWithoutFallback` keeps a `card_fallback_instead` refusal in place
when there is no fallback to offer, instead of letting the send through.
GUI: a message for a card the verification doesn't accept, and the
virtual-number message no longer mentions a card (the card link shows on its
own when one is offered).
* feat(gui): file pickers look and work like the dashboard's Files tab
The open, save and directory pickers draw the Files tab's listing: its
folders sidebar, breadcrumbs and typed paths, list and grid views, column
sorting, thumbnails, selection with Shift/Ctrl/Cmd and drag, and its
keyboard. Their rows and markup come from one module, fileListing.js, that
the Files tab now uses too.
- New FilePicker (listing) and filePickerDialog (button bar, answers).
UIWindow keeps its picker options and data attributes; callers are
unchanged. Pickers no longer use the explorer item container, so their
branches in openItem, UIItem, uploadSelection and refreshItemContainer
are gone.
- The Open button and a double-click send one answer through one path.
- The Files tab and UIDashboard look up their own elements only, so a
picker over the dashboard doesn't share their selection or crumbs.
- An app's open or directory picker closed with Escape or its close button
reports a cancel; the folder a directory picker is open in comes back
with a ~/ path.
- Pickers can create folders, rename, move to Trash, upload (open) and
take dropped files; their menus no longer launch apps.
- upload_items takes an onUploaded callback, so a picker selects what it
just uploaded even in a popup, which has no socket.
* fix(gui): no gap above a narrow file picker's folders
Below 768px the Files tab pads its folders column down past the
dashboard's menu toggle. A picker has no toggle.
* fix(gui): a file picker's folders keep the Files tab's 10px inset
The dashboard insets the Files section by 10px; a picker has no such
wrapper, so a hovered folder's highlight met the dialog's edge.
* style(gui): less room above a file picker's first folder
* fix(gui): a save picker's double-click and Enter don't save where Save is disabled
Double-clicking a file, or pressing Enter on it, in a save picker names the
save after it and presses Save. That ran the save even with the button
disabled: in the Trash, the Shared view or a view-only share. The Save
handler returns while the button is disabled.
* fix(gui): a save picker saves into the folder being opened, not the one before it
A folder opened in a picker becomes its current folder once the listing
arrives. Save pressed before then wrote into the folder that was on screen
before. The picker now exposes the folder a listing is on its way for, and
Save goes there; it's also disabled at once when that folder takes no saves.
* fix(gui): a file picker's sort arrow follows the click, not the re-listing
Clicking a column header or a Sort menu entry re-reads the folder, and the
header's arrow only moved once that answered. It moves with the click now,
as the Files tab's does.
* fix(gui): a file picker's row keeps its fitted name when a rename fails
A rename the server refuses puts the old name back cut to the desktop's
fixed length, which is shorter than the row has room for. The picker fits
the name to its row again.
* fix(gui): a file picker fits its names again when it's resized
Names are cut in the middle to the room their row has when it's drawn.
Resizing the picker left them as they were: still cut short in a wider
window, and overflowing in a narrower one. The picker watches the
listing's width and fits the names again, at most once a frame, as the
Files tab does.
* fix(gui): a file picker keeps the keyboard on its listing
The picker's keys only work while the keyboard's focus is inside it, and
several clicks took the focus away or left it on the wrong thing:
- A click on a sidebar folder, a nav arrow or a toolbar button left that
control focused. The arrows still moved the selection, but Enter went
to the control: it opened the folder again instead of the selected row.
The arrows and type-to-select now hand the focus to the listing, as the
Files tab's do.
- A click on a crumb, on a menu entry, on the picker's head or button bar,
and Enter in a rename left the focus on the page, where no key reached
the picker. The listing takes the focus back in each case. A crumb
reached with the keyboard keeps the focus on that folder's crumb.
* test(e2e): the directory picker test waits for the first picker to close
The test picked a folder and asked for a second picker at once. The first
picker's window was still closing, so the second one's locator matched
both windows and the test failed every run.
* fix(gui): a file picker's crumbs start at its edge on a phone
Below 480px the Files tab moves its crumbs and path field 50px in, to
clear the dashboard's menu button. A picker has no button there, so its
crumbs sat behind an empty gap, out of line with the arrows under them.
* fix(gui): the keyboard returns to a file picker's listing from the path field and a cancelled rename
Enter or Escape in the path field, and Escape in a row's name, hid the
field while it still held the focus. The listing doesn't take the focus
from a field, so it stayed on the hidden one and then fell to the page,
where the picker's keys don't work. The field is blurred before the
listing takes over.
* fix(gui): Enter opens the files just uploaded in a file picker
An upload started with the picker's Upload button ends with the uploaded
files selected and the focus still on Upload, so Enter asked for more
files to upload. The listing takes the focus once the upload is in.
* test(e2e): a file picker's keys work after a click on a sidebar folder or a crumb
* fix(gui): a change made elsewhere doesn't close a file picker's path field
A picker lists its folder again when another tab or device changes
something in it. Every listing closed the path field first, so a path
being typed was dropped mid-word, and Enter pressed just before the
re-listing was ignored. Only opening another folder closes the field.
* fix(gui): a file picker still opens a folder when it's sorted or re-listed before the folder arrives
* fix(gui): a file picker's alerts open above it and hand the keyboard back when they close
* fix(gui): a save picker's name errors show their quotes instead of HTML entities
* fix(gui): the Files tab leaves the keyboard on a file picker's crumb when it lists its folder again
* fix(gui): a rename made elsewhere doesn't move a file picker's row into the Files tab
* fix(gui): a file picker doesn't answer with a file that can't be signed
* fix(gui): a file picker keeps a selection made while its folder is being listed again
* refactor(gui): UIWindow drops the last of the old file dialog
Adds the puter.card-fallback.policy event, asked before
phone_verification_card_fallback.enabled is read. A listener that sets
enabled decides in place of config; with none, config decides as before.
From inside a file picker, Open in New Window and ctrl/cmd + click on a
folder, a sidebar folder, or a path segment opened a standalone folder
window over the dashboard. Those entry points are removed, so the click
opens the folder in the picker. The sidebar folder menu, which only held
Open and Open in New Window, is removed with them, and so is the
open_in_new_window string.
* feat(gui): show thumbnails for uploaded text, YAML and HTML files
A .txt, .yml, .yaml, .html or .htm file, or one typed as plain text,
YAML or HTML, gets a thumbnail of its first lines, drawn as source code
is but in one color: an HTML file shows its markup, not the page it
makes. Markdown, CSV and source files are matched by name first, since
a browser can type any of them as plain text. These files go through
the text queue, deadline and 16 KiB read of the other text files, and
the dashboard downloads only that much of one that has no thumbnail.
In the Files tab's list rows they show their type icon, as other text
files do.
* fix(gui): wrap the lines of a text file thumbnail, each as its own paragraph
A text file's lines ran off the page as source code's do, so a note written
one paragraph to a line showed only the start of each paragraph, and a line in
a right-to-left script was drawn left to right. A text file now wraps each line
inside the page, and a right-to-left line runs from the right. YAML and HTML
are one-color languages beside JavaScript, CSS and JSON, and still run off the
page as code does.
* fix(gui): show the type icon in list rows for text drawn by its type
A list row shows a page's type icon instead of the page, but told a page by the
file's name alone. A text file the generator draws because of its type, such as
a .log or .text file typed text/plain, kept its thumbnail in list rows, where a
page is a blank square. The type now counts too, with or without a charset.
* fix(gui): read text saved as UTF-16 for its thumbnail
Notepad and Excel save Unicode text as UTF-16, and Windows PowerShell writes
redirected output that way. Its NUL bytes made such a file look like it wasn't
text, so it kept its file icon. Text that starts with a UTF-16 byte order mark
is now decoded as UTF-16.
* feat(gui): confirm before trashing a worker's source file
Moving a worker's source file, or a folder that holds one, to the Trash
now asks first and deletes those workers when the user agrees. Workers
are found by prefix-matching the user's worker list against the trashed
paths, so folders aren't walked; the list is cached for a minute and
dropped when a worker is published or deleted.
* fix(gui): refresh the worker list after a rename or move
The cached list keeps each worker's source path, so a folder renamed or
moved within the minute went to the Trash without a warning, and a
folder a worker's file had just left asked to delete that worker. A
move, rename or update heard over the socket now drops the cache; a
move into the Trash keeps it.
* fix(gui): trash anyway when a listed worker is already gone
A worker deleted from another tab or the CLI since the list was cached
made the delete fail with not_found, so the user saw "Worker not found"
and nothing went to the Trash. That worker is already in the state the
user agreed to, so the move goes ahead.
* fix(gui): say which worker failed and that nothing was trashed
A failed worker delete showed only the raw error, with no title, so the
user couldn't tell which worker it was or whether their items had gone
to the Trash. The dialog now has a title, names the worker, and says
nothing was moved.
* fix(gui): show the trash worker dialog over every window
The dialog mounted on the body at the dashboard overlay's z-index, but
phones and tablets pin every window, the dashboard included, at 9999999,
so there the confirm sat hidden and trashing seemed to do nothing. Any
window can trash, so the dialog now stacks over all of them, as the auth
dialog does.
* fix(gui): ask once when Delete is pressed again before the dialog
A second Delete press while the worker list was loading opened a second
confirm for the same items, so the user had to answer twice and the
second answer acted on items already gone. A repeat check for the same
paths while one is pending is now dropped; the first one trashes them.
* fix(gui): bring back the phone selection bar when a trash is cancelled
The Delete button in the phone selection bar hid the bar before trashing.
Cancelling the worker dialog, or any other dialog that stops the trash,
left the rows selected with no bar to act on them. The bar comes back
when a selected row wasn't trashed.
* fix(gui): stop waiting on a stalled worker listing after 10s
The listing goes through the SDK's 15-minute idle limit, so a backend
that stopped answering left Delete doing nothing, and a second press was
dropped as a repeat. After 10s the trash goes ahead without the warning,
as it does when the listing fails.
* fix(gui): name every worker that couldn't be deleted
When several worker deletes failed, the dialog named only the first, so
the user didn't know the others were still running. It now lists each
one with its error.
* fix(gui): space lists in dashboard dialogs like paragraphs
A list in a dialog's message kept the browser's margins and 40px indent,
leaving a gap under it larger than the body's padding. It now takes the
paragraphs' spacing and a 20px indent.
An EmailMessage carries `senderAuth`: the result Puter recorded in the
message's X-Puter-Sender-Auth header when it filed it ({ result, from,
signedBy, local }), or null when there is none. Only the first such header
counts, which is the one Puter writes.
Testing on puter.com is authorized only from accounts declared up front,
with X-Bug-Bounty: <handle> on every request, from stable addresses.
Other accounts, IP rotation and unidentified traffic are outside the
policy and its safe harbor.
* perf(auth): a sign-in reads the team seat once; validate event carries request signals
- The seat a sign-in reads for its listeners is handed to the account
payload it builds afterwards, instead of being read again: one cache read
and, for an account with no seat, one database read fewer, and two fewer
serial stages.
- puter.signin.validate carries `request_signals`, every signal the edge
proxy raised on the request.
- A card step on an account that already has a card asks for that card,
entered again, the way a number on file asks for its number.
* feat(auth): proof of the phone or card on file belongs to the session that gives it
A sign-in made while the account owes proof of its phone or card on file
doesn't have its device remembered, and its session is noted. When a
session proves the phone or card, its device is remembered then, and every
other session opened while the proof was owed is revoked before the gate
clears, so clearing it from one session can't let another one in.
* fix(auth): proving the phone or card on file signs out the account's other web sessions
The proving session keeps its sign-in and is the only device remembered. A
sign-in that completes after the proof was given is not kept and is asked to
sign in again. If the other sessions can't be signed out, the gate goes back
on and the request fails.
* fix(auth): other sessions are signed out before the on-file gate clears; the phone proof counts for its sign-in
Proving the phone or card on file signs the account's other web sessions out
before the gate clears and again after it, so a session never sees the gate
open. Only the gates the request cleared go back on if the second pass fails.
The proof that allows an email change while the address is pending is kept
with the sign-in that gave it. A sign-in that isn't kept sets no session
cookie, and a provider sign-in in that case returns to its page.
* fix(auth): a gated sign-in checks the gate after its device id is kept
The check is the last step before the session cookie is set. Tests assert the
order of the gate writes and that a provider sign-in that isn't kept leaves no
session.
* refactor(gui): give the ZIP reader and the image-type check modules of their own
The reader of a ZIP archive's directory and entries moves from ooxml.js
to zip.js, and telling an image's type from its first bytes moves from
audio.js to images.js, so that readers of other packaged formats can use
both. The archive's read budget gets a name of its own, with the value
it had. What the existing readers do is unchanged.
* feat(gui): show the preview a packaged document carries as its thumbnail
Some formats are archives that hold a picture of the document, made by
the editor that saved it. On upload, the desktop takes that picture and
passes it to the image thumbnail generator:
- Pages, Numbers and Keynote keep preview.jpg and a smaller
preview-web.jpg, and files from before 2013 QuickLook/Thumbnail.jpg.
- OpenDocument text, spreadsheets and presentations keep
Thumbnails/thumbnail.png.
- Sketch keeps previews/preview.png.
- An EPUB's cover is found through its container and package document,
by the EPUB 3 property, the EPUB 2 metadata entry, or its name.
Nothing is rendered, and the image's type comes from its own first
bytes. A file with none of these, such as a template or a text file
with the name a Keynote file has, keeps its file icon. These files share
the queue and the 5 second deadline of Office documents, and a stored
preview may be up to 8 MiB, which is published with the other limits.
In the Files tab's list rows, Pages, Numbers, Keynote and OpenDocument
files show their type icon, as other documents do. A Sketch preview and
a book's cover show in list rows too.
* fix(gui): scale one packaged document's picture at a time
The upload generator is called for every file at once, and the stored
preview was scaled outside the queue that read it, so a folder of books
decoded all their covers together. Each picture is now scaled inside the
queue, as audio covers are.
* fix(gui): skip a stored preview that states more than 16 megapixels
A packaged document's preview or an EPUB's cover went to the image
generator at whatever size it stated, and a picture is decoded at full
size before it is scaled. A preview over 16,777,216 pixels is now passed
over for the next one the file holds, as pictures in Office documents
and HEIC photos are.
pixelSizeOf() moves to images.js beside imageTypeOf() and reads WebP,
so a WebP preview keeps its thumbnail.
* fix(gui): find an EPUB cover whose path holds an XML entity
The paths an EPUB's container and package document give are XML
attribute values, so a cover at "Tom & Jerry.jpg" is the entry
"Tom & Jerry.jpg". The entities in them are now decoded before the
percent-encoding is.
* fix(gui): pass over a damaged preview entry for the next one a package holds
* fix(gui): try each cover an EPUB declares until one is a usable picture
* test(gui): import the ZIP fixture with the DOCX one it sits beside