Commit Graph

4927 Commits

Author SHA1 Message Date
KernelDeimos fc03fafab9 dev(data-access): misc improvements to .update()
DRY some redundant code and use guard clauses where applicable.
2026-01-20 16:28:22 -05:00
KernelDeimos 464241e743 dev(data-access): implement .update() method 2026-01-20 16:28:22 -05:00
KernelDeimos 7c5639005b test(data-access): app .select() and .read()
Fixes are also included for a couple issues that were found:
- `null` being included in extensions list
- property called `user_owner` instead of `owner`
2026-01-20 16:28:22 -05:00
KernelDeimos ec0b333ad7 dev(data-access): implement .read() method
Most of this implementation matched `.select()` which saved time. The
common behavior can be factored out, but since the purpose of this
refactor is to flatten everything as much as possible I'm going to leave
the duplicated code and make a note to do this later.

The challenging part was `#build_complex_id_where()`, which is the
equivalent to the `fetch_based_on_complex_id_()` method in
EntityStoreService. This allows `uid: app-UUID-OF-APP` and `id: { name:
'editor' }` to both work.
2026-01-20 16:28:22 -05:00
KernelDeimos 2bb036616f dev(data-access): app select icon_size` param
Adds the `icon_size` parameter to the `.select()` method on the new
non-ES/OM implementation.

When adding the necessary `params` parameter to the `.select()`
method, it was noticed that the `predicate` parameter did not have a
default value - potentially causing a regression; a default value was
set for both `params` and `predicate`.
2026-01-20 16:28:22 -05:00
KernelDeimos 7cd7be7af5 dev(data-access): add filetype associations 2026-01-20 16:28:22 -05:00
KernelDeimos 3839afd805 dev(data-access): add app owner relationship
It turns out self-referencing tables add some nuances to what is and
what isn't ambiguous in SQL queries, so getting this right took a little
longer than expected. Following the entire chain doesn't seem to be
possible so a compromise is made by only traversing one level of depth.
(you can the uid of the owner of the app, but not the uid of the owner
app's own owner)
2026-01-20 16:28:22 -05:00
KernelDeimos 1a8130b8fd dev(data-access): add owner object to app select 2026-01-20 16:28:22 -05:00
KernelDeimos 6592f87882 dev(data-access): coerce boolean values from db
Adds `as_bool` utility function for boolean values from MySQL and
Sqlite, based on the previous implementatoin for ES/OM.
2026-01-20 16:28:22 -05:00
KernelDeimos a85d2b7098 fix(perms): fix revokePermission for "flat" impl
The "flat" implementation of permissions was broken because
revokePermission tried to delete entries by calling `.set` with an
option called "delete". I'm not sure if this has ever existed on the
puter-kvstore interface, so it's weird that it was called like that.
2026-01-20 16:07:10 -05:00
KernelDeimos 79fda7b8c2 fix(backend): update protected app perm implicator
The permission implicator for protected apps was written before changes
to the permission system that affect the conditions under which a user
is allowed to grant and revoke permissions; specifically this is the
`manage:` set of permissions, which now needs to be granted to the owner
of a protected app.

Additionally, the "level" component of the permission is ignored because
the owner of a protected all is implied to have all the permissions
pertaining to that protected app.
2026-01-20 16:07:10 -05:00
jelveh 6805c90252 Remove unnecessary logging in get_app function
Eliminated redundant cache and info log statements from the get_app helper to reduce log noise and improve code clarity.
2026-01-20 11:45:06 -08:00
Neal Shah 13578e81e6 gemini 2.5/3 no preview (#2306)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-20 11:43:01 +05:30
KernelDeimos 3da318129c fix(puter.js): check for uuid before relative path
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-19 19:55:04 -05:00
Daniel Salazar 35797536ba feat: usage endpoints, allow appName (#2303) 2026-01-19 15:15:06 -08:00
KernelDeimos c715057065 feat(puter.js): make home directory default cwd
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
Make the home directory (AKA "~") the default CWD for puter.js, making
relative paths work in environments other than app environments (i.e.
gui or worker environments).
2026-01-19 13:29:28 -05:00
Neal Shah e95aa81e00 OpenAI web_search support (#2299)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-19 00:01:47 +05:30
Daniel Salazar f9888e6705 feat: paginated list (#2296)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
* feat: paginated list

* fix: kv list
2026-01-16 16:16:47 -08:00
Neal Shah bd57f7a221 Add GPT 5.2 Codex (#2293)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-16 22:52:28 +05:30
Nariman Jelveh 6b45667220 Revert "feat(gui): add keyboard shortcuts guide dialog (#2278)" (#2288)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
This reverts commit 340d932ae1.
2026-01-15 15:35:13 -08:00
Rahul aswal 340d932ae1 feat(gui): add keyboard shortcuts guide dialog (#2278)
* feat(gui): add keyboard shortcuts guide dialog

* feat(gui): add dedicated keyboard shortcuts dialog
2026-01-15 15:34:40 -08:00
KernelDeimos 21d02e7dae fix(backend): status code check and handle HLMkdir
Fix the status code handling in hl_mkdir and handling to the HLMkdir
operation itself. This effectively fixes #1603.

Resolves #1603
2026-01-15 18:32:08 -05:00
KernelDeimos 452d1de92e refactor: MkTree and QuickMkdir parent dir check
Extract common behavior from MkTree and QuickMkdir to a separate method
which is user by both operations.
2026-01-15 18:32:08 -05:00
KernelDeimos f125830fba fix(backend): handle ll_mkdir exists race condition
Handle a race condition affecting mkdir operations with the
`createMissingParents` option enabled. When creating a directory because
this option was specified, errors because the directory already exists
are likely due to a race condition and should not be propagated to the
client but instead handled by using the directory that's already there.
2026-01-15 18:32:08 -05:00
KernelDeimos f9a3e86fe9 fix: normalize file object in /writeFile
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-14 18:21:46 -05:00
KernelDeimos 5e4dfbc963 fix: attempt coercion to fix vscode corruption 2026-01-14 15:05:17 -05:00
sn-o-w c367d00ce4 Revise README.ro.md for updates and corrections (#2280)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-14 10:03:50 -08:00
Daniel Salazar 0b9863814c fix: shard app usages properly by user (#2279)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-13 20:32:46 -08:00
Sauhbagya Prasad 529a3d026b Improve UI for App Deployment Options in Dev Center (#2266)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
* Improve UI for App Deployment Options in Dev Center

- Added CSS styling for deployment option cards
- Implemented active state switching between deployment methods with guardrails
- Abstracted saveEditApp for reuse across Deploy and Edit tabs
- Added error handling for invalid URLs in the Deploy tab

* updated mode's description and fixed function's error

* updated by npm install

* Revert "updated by npm install"

This reverts commit 82cd962f62.

* in url mode the deploy button is enabled by default
2026-01-13 10:54:08 -08:00
jelveh 07f3387363 Add CAPTCHA required message to English translations
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
Introduced a new translation key 'captcha_required' with the message 'Please complete the CAPTCHA verification' in the English locale file.
2026-01-13 10:19:31 -08:00
Daniel Salazar cdb422659c feat: more extension controller decorators (#2272)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-13 00:32:03 -08:00
Neal Shah f4c37d4cf4 prevent signout from workers (#2276) 2026-01-13 13:18:06 +05:30
Neal Shah edcfe63131 no_extra_params in together service to prevent defaults from being specified (#2275) 2026-01-13 13:08:30 +05:30
Neal Shah 989ee58f05 Retry for openrouter on max_tokens overage (#2274) 2026-01-13 12:30:05 +05:30
dependabot[bot] 237a96c706 chore(deps): bump qs and body-parser
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
Bumps [qs](https://github.com/ljharb/qs) and [body-parser](https://github.com/expressjs/body-parser). These dependencies needed to be updated together.

Updates `qs` from 6.13.0 to 6.14.1
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.13.0...v6.14.1)

Updates `body-parser` from 1.20.3 to 1.20.4
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.3...1.20.4)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
- dependency-name: body-parser
  dependency-version: 1.20.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-12 19:43:04 -05:00
Neal Shah bb6b40be7b Support getDeveloperProfile with no arguments (#2270)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-12 16:06:45 +05:30
Neal Shah 8e6d3d8d9f Make puter boot on windows (#2269)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-12 15:26:53 +05:30
Neal Shah 04901a7cd1 provide safety_identifier in addition to user (#2268) 2026-01-12 13:24:30 +05:30
Talasu_Deepak 44b2a0bd9a Add README for Puter localization and setup (#2043)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
* Add README for Puter localization and setup

This README provides an overview of Puter, including installation instructions, system requirements, and support information.

* Update README.od.md

---------

Co-authored-by: Nariman Jelveh <nj@puter.com>
2026-01-11 16:41:50 -08:00
Nariman Jelveh c051a6caa6 Add automatic thumbnail generation to file uploads in GUI (#2261)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
Introduces thumbnail generation for image files during upload operations. Thumbnails are generated client-side if enabled via the `generateThumbnails` option, and are included in file metadata and operation payloads. This enhances file previews and user experience in the file system.
2026-01-11 09:38:33 -08:00
KernelDeimos 8e418a11a1 fix(backend): race condition in hashing_stream
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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
Based on a stack trace from production and manual static analysis, it
appears that a race condition occurs within hashing_stream
intermittently. The conditions that cause this issue might be heavy
backpressure. The source stream emits the 'end' event before
stream.Transform's transform callback has had a chance to process all of
the chunks, which results in an incorrect order in calling methods on
the `typeof crypto.createHash()` object.

It would appear that `source.pipe(stream)` is not able to propagate
errors from Transform because the chain was simply broken and upload
would get stuck (if this was indeed the cause of upload getting stuck,
which seems likely but not conclusive)
2026-01-09 20:02:50 -05:00
Daniel Salazar d64bd21a99 feat: give referrals (#2262)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (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-01-09 16:48:49 -08:00
Neal Shah 5aa25bae5f Model singularity (#2255)
* model naming singularity

* model singularity pt2

* Remove incorrect assumption check which breaks openrouter:openai/gpt-5-image
2026-01-09 16:18:54 -08:00
Daniel Salazar 13f7d7b502 fix: husky (#2260) 2026-01-09 15:41:37 -08:00
Daniel Salazar f88ca5d4bd feat: kv.remove feature to remove nested elements or list indices (#2258)
* chore: update npm version

* feat: kv.remove feature to remove nested elements or list indices

* chore: update npm version
2026-01-09 15:10:02 -08:00
KernelDeimos 353f163f46 chore(backend): upgrade nodemailer 2026-01-09 17:54:38 -05:00
KernelDeimos e07d1ae4af dev(backend): limit thumbnail size from client
There was a configuration parameter for this but it isn't being used and
has the incorrect name in `config.js`. I decided to keep the old check
here anyway because having support to configure a lower size limit could
come in handy.

I set the limit to 2MiB through the following logic:
- largest icon size I've ever heard of is 512px
- 512*512*4 (4 color channels) is 1048576 (1MiB)
- increase to next MiB just to be safe
2026-01-09 16:36:47 -05:00
KernelDeimos b5ae9181f1 dev(puterjs): add thumbnail parameter to puter.js 2026-01-09 16:36:47 -05:00
KernelDeimos 645d60a84b dev(filesystem): add thumbnail parameter 2026-01-09 16:36:47 -05:00
Daniel Salazar 23d7b751b9 feat: new kvstore operatios for more granular updates 🚀 (#2254) 2026-01-09 12:20:54 -08:00