Commit Graph
975 Commits
Author SHA1 Message Date
Xiaochen CuiandGitHub 681c084180 client-cache: update cache-invalidation policy to ts-based comparison (#1611)
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 (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / api-test (22.x) (push) Has been cancelled
2025-09-24 18:08:09 -07:00
Daniel Salazar 8cc14fece3 chore: add jsdoc typings for KV interface 2025-09-23 14:26:35 -07:00
KernelDeimos 49341321f1 dev: add option to make the database slow
Adds a configuration parameter called "slow" to database config which
adds a hardcoded delay 70ms to database operations. This is useful
when testing for performance issues.
2025-09-22 19:10:48 -04:00
jelveh c0b03e147b add redundant readdir to cache the home dir 2025-09-18 21:03:28 -07:00
Nariman Jelveh 7000831138 make whoami return last_activity_ts 2025-09-18 19:07:53 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1475183b06 build(deps): bump multer from 1.4.5-lts.2 to 2.0.2 (#1582)
Bumps [multer](https://github.com/expressjs/multer) from 1.4.5-lts.2 to 2.0.2.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v1.4.5-lts.2...v2.0.2)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-18 10:36:39 -07:00
Neal Shah b1facfbabd fix: get rid of a console log
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-09-16 19:46:53 -04:00
ProgrammerIn-wonderlandandNeal Shah a48f3e0274 get rid of noReallyItsJson 2025-09-16 19:46:53 -04:00
ProgrammerIn-wonderlandandNeal Shah 1e620c73bc make drivers and KV also preflightless 2025-09-16 19:46:53 -04:00
ProgrammerIn-wonderlandandNeal Shah 135d7b81a4 preflightless stat/readdir 2025-09-16 19:46:53 -04:00
KernelDeimos c588ff20d0 clean: remove logs (obvious cases)
This commit removes debug logs that meet these criteria:
- used console.log instead of the log service
- were left in the source tree accidentally
- show up at boot or during stat/readdir operations

This is not a comprehensrve removal; this is a first pass to get a
few of the trivial cases.
2025-09-16 01:12:57 -04:00
Nariman Jelveh e4c2581623 Make readdir workd with uid in addition to path 2025-09-15 20:12:45 -07:00
KernelDeimos d482d7cdf5 dev: add immutable default directories to whoami 2025-09-15 22:11:02 -04:00
Nariman Jelveh eb53b86c8a feat: add optional input image fields to AIInterfaceService
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
- Introduced `input_image` and `input_image_mime_type` as optional parameters in the AIInterfaceService schema to enhance image processing capabilities.
2025-09-15 16:57:38 -07:00
Nariman Jelveh 4e8aad675d feat: improve image generation and coercion for data URLs
- Updated `GeminiImageGenerationService` to differentiate between data URLs and web URLs for image handling.
- Added coercion support in CoercionService for converting data URLs to streams, including extraction of content type.
- Documented the txt2img method in AI.js to clarify usage for text and image-to-image generation.
2025-09-15 15:45:54 -07:00
KernelDeimos 6480d37ec0 fix: make optimization for is_empty conditional
Usually Puter has a UID by this point, but if it ever doesn't we can
fall back on using the path with a `LIKE ? + '%'` query. However,
users before a particular date might have fsentries without a path,
so we need to perform a check on the user's timestamp to avoid issues.
2025-09-15 18:29:10 -04:00
KernelDeimos 3af84c0647 fix: is_empty sometimes being wrong
is_empty wasn't working correctly while running concurrently with
fetchEntry because because the check in fetchIsEmpty was too
specific. This commit fixes this issue while also adding support for
a 'path' parameter to is_empty.
2025-09-15 18:29:10 -04:00
Nariman Jelveh f4fc24bce3 feat: add support for image-to-image generation in GeminiImageGenerationService
- Enhanced the `generate` method to accept base64 encoded input images and their MIME types.
- Implemented validation for input image and MIME type to ensure proper usage.
- Updated the content construction logic to handle both text-to-image and image-to-image generation scenarios.
2025-09-15 15:08:06 -07:00
KernelDeimos ef76d33cc2 fix: string coercion for email verify code
Some databases will automatically do this string coercion, but others
will not. This commit ensures the value is always a string.
2025-09-15 14:56:42 -04:00
Nariman Jelveh 5121dbd300 Update PuterHomepageService.js 2025-09-15 11:28:42 -07:00
Daniel SalazarandGitHub 4e563b4238 Merge pull request #1560 from HeyPuter/DS/main
fix: expiry time for dbkv
2025-09-15 10:44:21 -07:00
KernelDeimos b92a4edb83 fix: missing return for app icons on init
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-09-15 04:31:36 -04:00
KernelDeimos 4d92f4a3ce fix: missing span name ("fn is not defined" error) 2025-09-15 04:28:51 -04:00
KernelDeimos ed5464f0c0 tmp: disable refresh_app_cache
Earlier I actually thought this wasn't running in prod because when I
run Puter locally the "refresh app cache" message doesn't appear.
I ensured that minlog was off but I forgot that around the same time
I also disabled the "tick" log level by default. If it weren't for
that I would've realized this an hour ago. That said, it's kind of
odd that this seems to be the source of the leak, because this isn't
new behavior.
2025-09-15 04:15:19 -04:00
KernelDeimos 3a0733f557 debug: add annotation class for app objects
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-09-15 04:00:27 -04:00
KernelDeimos 7d7291cde4 fix: add unlink() methods to clear ECMAP 2025-09-15 03:19:46 -04:00
KernelDeimos 509f1add4e tmp: for now, make refresh_apps_cache a noop 2025-09-15 02:47:11 -04:00
KernelDeimos f98c78504b fix: try disabling this 30 second app cache for now
OOM conditions happening... maybe this will fix it
2025-09-15 00:12:46 -04:00
KernelDeimos 42abfcc5e7 perf: huh, right... not sure how I missed that
These two async operations depend on fetchEntry, but they do not
depend on each other; they can be run in parallel.
2025-09-14 20:40:18 -04:00
KernelDeimos 27ab23e7b1 fix: read 'push' of undefined
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-09-14 19:01:59 -04:00
KernelDeimos f3fdfea65b perf: add 30 second app cache
There used to be an app cache here that would be invalidated but I
think this may have been removed because the invalidation logic
was causing issues. A 30 second cache seems reasonable though, so
let's do that for now.
2025-09-14 19:01:59 -04:00
KernelDeimos 733b6a653e perf: further readdir improvements 2025-09-14 19:01:59 -04:00
Daniel Salazar 860f68a9a5 fix: expiry time for dbkv 2025-09-14 12:48:25 -07:00
KernelDeimos 094dd183b2 fix: event multiplication introduced in ebf4d7
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-09-13 22:41:09 -04:00
KernelDeimos 7872fd58ed perf: optimize extension loader
Parallelize as much as possible, and avoid reading data from the
package.json when the file was generated by the extension loader
in the first place.
2025-09-13 22:41:09 -04:00
KernelDeimos 7730877c91 dev: add extension initialization priority 2025-09-13 22:41:09 -04:00
KernelDeimos 55c53d9eee dev: extension registry and lifecycle
Adds `register`, `registry`, `preinit`, and related symbols to the
available extension globals.
2025-09-13 22:41:09 -04:00
KernelDeimos 9135632129 dev: add support for ES6 Module extensions
Previously ES6 Module extensions would only work on versions of node
with --experimental-require-module enabled by default, and provided the
entry file had no top-level await. This commit uses "await import"
conditionally if the "type" in package.json is set to "module".
2025-09-13 22:41:09 -04:00
KernelDeimos a5882889dd perf: make stat really fast 2025-09-13 20:27:44 -04:00
KernelDeimos c70434d947 perf: avoid reduntant fetches due to concurrency
Sometimes the same fs entry is fetched multiple times concurrently
because of parallel methods with separation of concerns.

After this commit, only one parallel fetch will go through and the
others will wait for it. Subsequent fetches will not occur is the
data that was needed is already there.
2025-09-13 20:27:44 -04:00
KernelDeimos 6a129ba8cc perf: skip quick_check for only one provider
The 'quick_check' increases the amount of time it takes to perform a
stat operation significantly proportional to the time it takes to do
a stat because an fsentry fetch occurs before a transient
memoization map is available for an operation.
2025-09-13 20:27:44 -04:00
KernelDeimos 5119efaf79 Reapply "feat: support Gemini imagegen service"
This reverts commit 05071b4338.
2025-09-12 19:16:58 -04:00
KernelDeimos c40c138aa2 fix: I have no idea how I didn't catch this
Apparently this just never happens when I use Puter locally.
2025-09-12 19:09:41 -04:00
KernelDeimos 05071b4338 Revert "feat: support Gemini imagegen service"
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This reverts commit e13b008c79.

This is being done temporarily to debug something else without
confounding variables.
2025-09-12 18:43:20 -04:00
ProgrammerIn-wonderlandandNeal Shah e13b008c79 feat: support Gemini imagegen service 2025-09-12 18:17:31 -04:00
KernelDeimos b3e2b69c4d perf: execution context memoization map for filesystem
This commit adds an object called ECMAP. This object is a transient
memoization store for use by FSNodeContext.
2025-09-12 18:13:41 -04:00
KernelDeimos 43a0be33ca fix: selector handling from 8cfa0ece
For instances where svc_fs.node was called and explicitly passed a
NodePathSelector (instead of being passed a legacy-style object
with a path attribute) this code was failing. This commit moves the
affected code snippet after input coercion and updates references
to use the coerced input.

style: formatting changes were applied to the code. Instead of using
nested conditional blocks we use labelled breaks
2025-09-12 16:59:47 -04:00
KernelDeimos c508189455 fix: missing condition in ownership check
Not sure when this went away, but we were always getting the
permission though the file path instead of ID/UUID from what it
looks like, which was hiding this problem.
2025-09-12 16:45:39 -04:00
KernelDeimos b8354cc4a6 perf: always shortcut is-owner implicator 2025-09-12 15:26:09 -04:00
Nariman Jelveh 8cfa0ece15 Hit the cache under the user object when trying to resolve paths to system directories 2025-09-12 11:43:49 -07:00