Daniel Salazar
5f28b988ec
test: add tests for SystemController ( #3009 )
...
Covers /healthcheck (live status, 503 on failure, fallback when service
unavailable), /version (semver parsing, env defaults), /contactUs
(validation, persistence, email best-effort, default support address),
/whoarewe, /lsmod (interface grouping + driverName fallback), and the
prepareShutdown drain-flag flip.
Closes #2971
2026-05-07 21:40:27 -07:00
Daniel Salazar
160631b158
test: add tests for OIDCController ( #3008 )
...
Covers the provider listing route, the auth-start redirect (404 / 400 /
500 / 302), all three callback flows (login / signup / revalidate)
including state validation, suspended accounts, unconfirmed-email
linking refusal, redirect_uri origin clamping, and the
revalidate-done landing page. Routes are collected via PuterRouter and
invoked with stubbed services that return prefab data.
Closes #2966
2026-05-07 21:38:47 -07:00
Daniel Salazar
9a7d3bac5f
test: add tests for DesktopController ( #3006 )
...
Covers /set-desktop-bg (partial updates, null clearing, type validation),
/update-taskbar-items (JSON serialization), /set_layout (layout
allowlist, ownership gate, path/uuid resolution), and /set_sort_by
(sort_by/sort_order allowlists, default ordering). Routes are
collected via PuterRouter and driven with stub stores returning
prefab fsentry rows.
Closes #2970
2026-05-07 21:37:34 -07:00
Daniel Salazar
0a9a4f629d
test: add tests for StaticPagesController ( #3005 )
...
Covers /robots.txt (bot disallow + sitemap), /sitemap.xml (docs +
approved-listing apps), /unsubscribe (missing/invalid uuid, idempotent
re-runs), and /confirm-email-by-token (token mismatch, already-confirmed
short-circuit, duplicate-email rejection, success path with verified-
group promotion + best-effort side channels). Stub stores hold prefab
user rows; the DB stub returns canned EXISTS / SELECT results.
Closes #2975
2026-05-07 21:36:50 -07:00
Daniel Salazar
32c2c0c1a5
test: add tests for AppController ( #3004 )
...
Covers /apps, /apps/nameAvailable, /rao, /apps/:name (single + batch),
/query/app (max-entries cap, marketplace shape, hidden-app gating), and
/app-icon (default fallback, data-URL decoding, MIME allowlist, CDN
redirect). Routes are collected via PuterRouter; AppDriver is injected
through the shared `driversContainers` registry, and stub stores return
prefab app rows.
Closes #2969
2026-05-07 21:35:49 -07:00
Daniel Salazar
508d652194
test: add tests for StaticAssetsController ( #3003 )
...
Covers each config-gated branch (client_libs_root, puterjs_root,
gui_assets_root, builtin_apps) using real temp directories so the
existsSync checks see real files instead of mocked module behavior.
Asserts both registration outcomes (which routes appear, on which
subdomains) and the file resolution rules for the puter.js / puter.dev.js
fallback.
Closes #2974
2026-05-07 21:35:17 -07:00
Daniel Salazar
05425d20a7
chore: cleanup types for tests ( #2948 )
2026-05-07 13:40:58 -07:00
Nariman Jelveh
360cbf48af
feat: support code in puter.signup.validate error responses ( #2945 )
...
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
Extensions listening on the `puter.signup.validate` event can now set a
`code` field (in addition to `message`) when blocking signups. The code
is forwarded through HttpError and appears in the JSON error response,
giving clients a stable, machine-readable signal to act on.
Covers both the AuthController (password signup) and OIDCService paths.
Adds tests for the new field.
2026-05-07 10:11:08 -07:00
Daniel Salazar
bbe93defe9
tests: add some more driver tests ( #2944 )
2026-05-07 10:04:39 -07:00
Daniel Salazar
4b37f35803
test: tests for fs endpoints ( #2942 )
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
2026-05-06 22:55:53 -07:00
ProgrammerIn-wonderland
872d2c01d4
Add support for log in with Apple ( #2935 )
...
* Add experimental login with Apple support
* Fix revalidate URL
* Fix OIDC provider revalidate in whoami as well
2026-05-06 16:47:24 -04:00
Daniel Salazar
c1dacab4c2
extension events after boot fixes ( #2925 )
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
2026-05-05 17:42:55 -07:00
Daniel Salazar
50fe867e0d
fix: fs issues [PUT-846] ( #2918 )
...
* fix: fs issues
* windows install script
2026-05-05 10:49:04 -07:00
Nariman Jelveh and Claude Opus 4.6
1f1149e32e
Block unconfirmed users from API endpoints server-side ( #2916 )
...
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
Add a default-on email confirmation gate that rejects users with
`requires_email_confirmation && !email_confirmed` on all authenticated
routes, returning 403 with `email_confirmation_required`.
Previously this was only enforced client-side via a GUI modal, meaning
direct API calls could bypass the check entirely.
Essential routes are exempted via `allowUnconfirmed: true`:
`/whoami`, `/logout`, `/send-confirm-email`, `/confirm-email`,
`/save_account`, `/get-anticsrf-token`, `/get-gui-token`,
`/session/sync-cookie`, `/auth/revoke-session`,
`/user-protected/delete-own-user`
No impact on temp users (`requires_email_confirmation` is false),
self-hosted deployments without email (flag is never set), or
unauthenticated routes (login, signup, password recovery, OIDC).
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-05 10:08:50 -07:00
Daniel Salazar and Copilot
50679e6a01
selfhosting: p2 fixed default configs and guide + some other errors ( #2903 )
...
* fix: ollama support
* fix: more self host cleanup
* fix: bad auth
* fix: more session cookie stuff
* allow emailclient
Co-authored-by: Copilot <copilot@github.com >
* fix: broken migration
* fix: full-stack comment
* fix: hardcoded perms
* new docker build steps
---------
Co-authored-by: Copilot <copilot@github.com >
2026-05-04 18:14:23 -07:00
jelveh
4395c8bea5
Handle OIDC popup flow: skip session list
2026-05-01 23:49:35 -07:00
Daniel Salazar
1796fdb37b
fix: misc fs issues ( #2883 )
...
* fix: deps
* fix: FS issues
2026-05-01 18:54:10 -07:00
jelveh
25f02378cb
Update StaticPagesController.ts
2026-05-01 17:29:07 -07:00
jelveh
e95e2f5187
Use full HTML template for static pages
2026-05-01 17:18:06 -07:00
Daniel Salazar and Copilot
2c261fc6c0
fix: extensions ( #2881 )
...
Co-authored-by: Copilot <copilot@github.com >
2026-05-01 16:36:15 -07:00
Daniel Salazar and Copilot
a3b11de1a2
fix: better error codes + unlimited local credit ( #2880 )
...
* fix: better error codes
Co-authored-by: Copilot <copilot@github.com >
* fix: add in local unlimited metering again
Co-authored-by: Copilot <copilot@github.com >
---------
Co-authored-by: Copilot <copilot@github.com >
2026-05-01 14:43:13 -07:00
Nariman Jelveh
267f464232
Add AGPL license headers to source files ( #2877 )
2026-05-01 13:50:42 -07:00
Daniel Salazar
1b39bd2a4a
fix: app autocreation ( #2872 )
2026-05-01 09:03:42 -07:00
Daniel Salazar
e8fbb88102
puter models list fix ( #2869 )
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-05-01 01:41:56 -07:00
Daniel Salazar and Copilot
f6e1f90225
fix: dbConfigs and ai routes ( #2868 )
...
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* fix: db configs
Co-authored-by: Copilot <copilot@github.com >
* fix: ai routes
Co-authored-by: Copilot <copilot@github.com >
---------
Co-authored-by: Copilot <copilot@github.com >
2026-04-30 23:56:18 -07:00
Daniel Salazar and Copilot
0e53edafa3
fix: send right error codes ( #2867 )
...
Co-authored-by: Copilot <copilot@github.com >
2026-04-30 21:42:48 -07:00
Daniel Salazar
48a85998ad
fix: sync ips for validation ( #2865 )
...
* oidc email validate
* fix: sync ips for validation
2026-04-30 17:53:25 -07:00
Daniel Salazar
1a6b02999b
fix: more clean ip ( #2864 )
2026-04-30 16:45:54 -07:00
Daniel Salazar
976f1de806
fix: event ( #2863 )
2026-04-30 16:37:27 -07:00
Daniel Salazar
1546e0e02f
fix: auth checks ( #2862 )
...
* rename validate email
* fix: authService
2026-04-30 16:32:22 -07:00
Daniel Salazar
208abda841
fix: bad ai endpoint ( #2856 )
2026-04-30 12:38:39 -07:00
d4d78ac7db
rework: change backend and backend extensions to use simpler code structure and patterns ( #2815 )
...
* fix: dynamodb health checks and client recreation (#2789 )
* wip: no nanoServices groundwork
* feat: data clients in new shape
* wip: auth and perms in new system
* more wip
* middlewaters mainly done
* wip: fsv2 in new layout
* old fs v2 migration
* driver system
* driver and old fs fixes
* ai drivers wip
* stream support
* metering in ai chat driver
* wip: new auth
* rate limit and auth routes
* captcha and anti csrf
* fix: types
* auth store
* app logic
* wip most other dricvers
* fs
* mostly kill all legacy stuff
* fs finish
* fix: redis usage
* ai controller
* driver cleanup
* socket io in v2
* broadcast and crudq stuff
* subdomains
* notifcations and shares
* fix bad syntaxes
* auth wip
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
* extensions
* extension setup
* more routes
* sql migrations and default services
* home router
* tier 7
* everything else
* everything else
* remaining missing bits
* server health
* logs
* cleanup
* deps
* cleanup 2
* more cleanup 2
* boot
* fix launch
* config fix
* move file
* fix: tsconfig things
* fix: extension loading
* launching
* fix: drivers
* fix: others
* fix: icons
* fix: file uploads
* fs fixes
* fix: fs api
* fix: dev-center
* config
* add back telemetry
* lint stuff
* husky hooks
* fix: fs oss
* fix: config migration
* config migration
* migrate scripts + replicate
* runner
* fix: merge defafult config
* fix: default region
* fix: api domain
* fix paths in readfile
* fix fs entry default s3
* NS: Remove Referral && Entri Service
* dep cleanups
* fix: static assets
* fix: kv and perms
* fix: driver registrations
* fix: home mapping
* fix: rao
* adding back 500 alarm
* fix: build paths
* fix: fs and kv shapes
* fix: kv shape
* more kv coercing and ai chat matching format as prior
* fix: private app gates
* private app caches
* fix: whole bunch of legacy shape issues
* update template jsonc
* fix caching partial oidc and fs signed paths
* more oidc fixes
* fix: wip
* fix: private apps
* admin route fixes
* fix: last few things hopefully
* claude uploads
* fix security for app only routes
* fix kv system namespace
* stuff
* fix: app and kv and suggested apps
* fix:open item
* fix: FS operations
* fix: default app icons
* add back token-read and WSL support
* metering fixes
* fix: fsEntry
* perm scanners and implicators
* proper download endpoint
* fix: download
* fix anti csrft on v2
* fix file extensions, app icons
* fold in v1 fixes from origin/main into v2 equivalents
Re-applies the v1 fixes that landed on origin/main into their v2
counterparts since the v1 files were deleted on DS/wip during the v2
migration. v1 commits referenced below.
- SQLBatcher: flush immediately when queue hits maxBatchSize instead
of racing the timer (v1 12f48238).
- RedisClient: drop maxRetriesPerRequest from 2 to 1 to shrink failure
window (v1 b6776ab4 ).
- ChatCompletionDriver: default minimumCredits to 1 when unset/zero so
zero-cost precheck doesn't auto-pass (v1 36bd6073 ).
- OpenAiImageProvider: add gpt-image-2 support — open-ended size rules,
token-based cost estimator, arbitrary-size normalizer, isGpt prefix
broadened to gpt-image- (v1 f14f1bf4 ). models.ts auto-merged via
rename detection.
- AppStore: bump row cache TTL from 5m to 24h (v1 6b3196ed ).
Not ported: v1 app-object Redis cache (bdfa12b5/b886dde3) — v2's
#toClient recomputes filetype_associations/created_from_origin per
read; adding a second cache layer is a larger change for a follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
* remoe anti-csrf from auth routes that had not used them
* more icon fixes
* fix worker functionality
* fix: app and subdomain es
Co-authored-by: Copilot <copilot@github.com >
* fix PUT-761
* fix: PUT-748
* fix: rename fsService
* Add security back to WorkerDriver
* Migrate worker from fsEntry to fs. Fix cache issue
* remove ability to create symlinks
* strict webdav acl
* require auth for wisp
* chore: service renames
* Add metering back to puter peer api
* fix: PUT-760 PUT-749
* fix: PUT-746
* fix: peer cost
Co-authored-by: Copilot <copilot@github.com >
* fix: 771
* change order of peer controller
* fix: create appdata folder for app on get auth token
* fix: align delete site and list sites
* delete: putility
* fix subdomains
* Add support for tilde in subdomains, fix subdomain update
* cleanup PeerController.ts and fix billing oversight (#2844 )
* fix: PUT-786
* fix: bugs
* fix: issues with multiple subdomain queries, or permission checks
* fix: harden response shapes to not contain uneeded fields
* fix: move state to redis
* fix: missing kv methods + better sec
Co-authored-by: Copilot <copilot@github.com >
* fix: subdomainStore limit
* fix: missing path resolution
Co-authored-by: Copilot <copilot@github.com >
* fs fixes
* fix: undef error
* fix fs + cleanup
* fix: npm audit fixes
* heal path entries where missing
Co-authored-by: Copilot <copilot@github.com >
* fix: caching
Co-authored-by: Copilot <copilot@github.com >
* fix: cache inconsistencies
Co-authored-by: Copilot <copilot@github.com >
* fix: app driver metadata
Co-authored-by: Copilot <copilot@github.com >
* remove extraneous comma
* fix: associated app icons
* fix: bad tool call
* Add validation to WorkerDriver#getFilePaths
* misc fs and auth issues
Co-authored-by: Copilot <copilot@github.com >
* fix: oidc errors
Co-authored-by: Copilot <copilot@github.com >
* fix: PUT-797
* fix: legacy appdata_app
Co-authored-by: Copilot <copilot@github.com >
* fix: add alert logs
Co-authored-by: Copilot <copilot@github.com >
* fix: error handling
* Disable sharecontroller
* fix: remove private user identifier for ai
* fix: private app fixes
* Add backback signup_server
* fix: completionId size
Co-authored-by: Copilot <copilot@github.com >
* fix: revalidate path for oidc
* fix: revalidate path for oidc
* fix: email validation
Co-authored-by: Copilot <copilot@github.com >
* fix: user create query
* fix: middleware extensions
Co-authored-by: Copilot <copilot@github.com >
* use x-forwarded-for for req ip forwarded
* fix: missing last_activity ts
* feat: add cache broadcast to subdomains
* fix: update config typing
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
Co-authored-by: ProgrammerIn-wonderland <3838shah@gmail.com >
Co-authored-by: Copilot <copilot@github.com >
Co-authored-by: Nariman Jelveh <nj@puter.com >
Co-authored-by: velzie <velzie@velzie.rip >
2026-04-30 12:13:43 -07:00