Commit Graph

3593 Commits

Author SHA1 Message Date
jelveh 1b83966c26 Update signup.js 2025-04-13 16:24:19 -07:00
KernelDeimos 107adce68b dev: disallow "auto" model
This model seems to cause us problems
2025-04-12 16:53:53 -04:00
jelveh daa95d8c39 Update AI.js 2025-04-10 20:17:35 -07:00
KernelDeimos dc2e406cc6 fix: use event service 2025-04-10 15:45:46 -04:00
KernelDeimos c7c7f78255 Revert "tmp: temporary timeout to test a theory"
This reverts commit d1e4ed7f63.
2025-04-10 01:40:21 -04:00
KernelDeimos d1e4ed7f63 tmp: temporary timeout to test a theory 2025-04-10 01:32:53 -04:00
KernelDeimos 3f0e990398 dev: polling in usage tab 2025-04-09 14:34:32 -04:00
KernelDeimos f0c06931bd fix: check funding with no args 2025-04-09 14:34:32 -04:00
KernelDeimos 2c9bc8f9e0 dev: instant update for usage in settings 2025-04-09 14:34:32 -04:00
KernelDeimos 0176a1f629 dev: update usages tab 2025-04-09 14:34:32 -04:00
KernelDeimos b5848012a9 delete: monthly usage limiting 2025-04-09 14:34:32 -04:00
KernelDeimos fc677ef61f dev: migrate judge0 and convertapi to cost service 2025-04-09 14:34:32 -04:00
KernelDeimos b57b907ba6 dev: migrate textract to use cost service 2025-04-09 14:34:32 -04:00
KernelDeimos 8d175bd3fa doc: test values for PermissiveCreditService 2025-04-09 14:34:32 -04:00
KernelDeimos c9d4eec018 dev: migrate polly to use cost service 2025-04-09 14:34:32 -04:00
KernelDeimos 82a4ab0884 dev: migrate image gen service to use cost service 2025-04-09 14:34:32 -04:00
KernelDeimos 14304143af dev: migrate image generation to use cost service 2025-04-09 14:34:32 -04:00
KernelDeimos b9b9c95f84 dev: minimum cost option 2025-04-09 14:34:32 -04:00
KernelDeimos 0201b93013 fix: redundant report-usage call in FakeChatService 2025-04-09 14:34:32 -04:00
KernelDeimos d0edb2c1f3 fix: async handling for events
There were issues with async handling in events which can make it
difficult to use event handlers to mutate values provided by an emitter.

This is not an optimal solution: this will await event listeners in
sequence. Ideally, event listeners should be awaited concurrently.
2025-04-09 14:34:32 -04:00
KernelDeimos 1f7073ef76 dev: add services property to extensions
A small change that adds ".services" to the "extension" global in an
extension, so extensions can more easily talk to other services.
2025-04-09 14:34:32 -04:00
KernelDeimos 21bd427cef refactor: generalize handling of costly services
Usage/cost tracking per user was over-fitted to LLM/AI services. This
commit adds CostService and updates AIChatService to use that instead of
updating the `ai_usage` table. The `ai_usage` table is now considered
deprecated.

A service called PermissiveCreditService is enabled by default in
SelfHostedModule. This is so users who host their own Puter instances
don't have to worry about usage limits, since they're providing their
own keys anyway.
2025-04-09 14:34:32 -04:00
KernelDeimos 0347a38136 fix: handle all temp user errors by reloading 2025-04-09 13:27:30 -04:00
KernelDeimos c8d52b3203 style: captcha refresh button 2025-04-08 16:54:36 -04:00
KernelDeimos d0e06e83c0 dev: add ip to captcha middleware event 2025-04-08 16:54:36 -04:00
jelveh 592acbcae6 remove "anthropic/" from model name 2025-04-08 12:34:23 -07:00
KernelDeimos 27fd7b3670 fix: broken model parameter 2025-04-08 13:27:56 -04:00
Nariman Jelveh fd910f36cf Merge pull request #1169 from shushannap/FAtranslation
tweak: reorder and fix Farsi translation of i18n keys
2025-04-08 08:41:16 -07:00
KernelDeimos 95ddfe3909 fix: error handling in ThreadService 2025-04-07 19:02:52 -04:00
KernelDeimos fc11eba070 fix: puter.js threads error handling 2025-04-07 18:43:21 -04:00
KernelDeimos 3e98d13f6b doc: document driver endpoint 2025-04-07 14:37:45 -04:00
KernelDeimos 9a12db2066 fix: .startsWith on undefined 2025-04-04 17:58:06 -04:00
jelveh 4fb772796f Update AI.js 2025-04-04 14:43:53 -07:00
EvaNtziou dad72c5bd7 feat: button to remove profile image #1245 (#1246)
* Restored and updated UITabAccount.js, style.css
* Update UITabAccount.js

Closes: 1245
2025-04-04 16:00:53 -04:00
jelveh 80060e863d Use openrouter for llama models 2025-04-03 17:23:26 -07:00
Nariman Jelveh ddb04431cc Update README.md 2025-04-02 18:48:22 -07:00
jelveh 590973f50d Update AI.js 2025-04-02 12:04:38 -07:00
KernelDeimos fb01bb474a fix: edge case during email change
Previous logic was:
- on email change, update temporary value
- send email to confirm new email
- temporary value is moved to real email

This doesn't work when an account has not yet confirmed their email
after signup (i.e. user's email_confirmed is still 0). Well, it actually
does work, but the user is only able to confirm the change to their
email and not set their account as having a confirmed email.

New logic has a branch for this case; IFF email_confirmed=0:
- change account confirm code
- send new account confirm email
2025-04-01 12:41:49 -04:00
KernelDeimos 7a3365a25c refactor: begin migrating utility code
I'm calling this approach a "re-core"; see src/backend-core-0/README.md
for more information about this.
2025-03-31 22:09:29 -04:00
KernelDeimos f2305ff289 fix: how did this get here 2025-03-31 20:22:13 -04:00
KernelDeimos e5f23e815d dev: disable textex by default
it's too verbose now
2025-03-31 20:07:19 -04:00
KernelDeimos f80105af6d fix: sure, but how 'bout a logo that isn't broken
A logo addition from another PR snuck in. This definitely makes it
consistent with signup, but this logo broken! This commit makes it be
not broken anymore.
2025-03-31 19:33:55 -04:00
Eric Dubé b7defab2d2 refactor: Migrate interfaces.js to new registration mechanism (#1239)
* refactor: migrate interfaces.js to new registration mechanism

- Created EntityStoreInterfaceService for crud-q interface\n- Created AnalyticsInterfaceService for puter-analytics interface\n- Added InterfacesModule to load these services\n- Removed interfaces.js\n\nCloses #1131

ai: true

* chore: remove interfaces.js file

ai: true

* fix: DRY CRUD interfaces

This comment is flagged as AI-generated, but Claude rate-limited before
it could actually make the commit so this commit was made by hand. Well,
while I'm writing this commit message I may as well mention that Claud's
rate limits are relentless and it has become impossible to use Claude
for some purposes as a result.

ai: true

* refactor: replace interfaces module with separate Module.js files for entitystore and analytics

- Removed interfaces module\n- Added EntityStoreModule.js to entitystore module\n- Added AnalyticsModule.js to analytics module\n- Updated main index.js to use the new modules directly\n\nai: true

ai: true

* fix: modules exported and registered incorrectly

* feat: add KVStoreModule for puter-kvstore interface

- Created KVStoreModule.js\n- Created KVStoreInterfaceService.js to register the puter-kvstore interface\n- Updated exports.js to include the new module\n\nai: true

* fix: remove index.js from kvstore module

- Removed unnecessary index.js file from kvstore module\n\nai: true

* fix: remove index.js files from analytics and entitystore modules

- Removed unnecessary index.js files from analytics and entitystore modules\n\nai: true

* fix: cleanup mycoder mistakes again

...because it actually threw out my previous commit where I already did
this.
2025-03-31 19:32:38 -04:00
Krista Vlastou 647ae35c84 Added a confirm password field and a show password option 2025-03-31 16:30:55 -04:00
KernelDeimos 6451f1b4e9 fix: error handling error in UIWindowSignup
Caused-By: ad4b3e7aeb
2025-03-31 13:22:31 -04:00
jelveh da2a8de307 Update UITabUsage.js 2025-03-29 16:51:24 -07:00
jelveh 1d1b4f81b5 clean up html and css 2025-03-29 12:31:23 -07:00
KernelDeimos a276a82e44 fix: put guard around startup chime 2025-03-29 14:57:45 -04:00
KernelDeimos 7c1fb4c3bf dev: improve puter.js convert interface 2025-03-28 22:39:28 -04:00
Jonathan Mahrt Guyou ad4b3e7aeb feat: captcha
* Added Revis distributed cash to enhance our Captcha Verification system so that we prevent our system from replay attacks

* Fix: There was an error with the implementation of Redis, so I reverted to our previous version that uses in memory storage

* Integrated the captcha verification system into our sign in Form. The captcha verification system now works on both login and sign int

* Remove test files from captcha module

* Update src/backend/src/modules/captcha/middleware/captcha-middleware.js

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>

* Update src/backend/src/modules/captcha/middleware/captcha-middleware.js

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>

* Now the captcha can be requested on condition, this llaows extenstions to control wether a captcha should be required,
I fixed the code in CaptchaModule to use config
and got rid of the lines that made captcha middleware available since it wasn't used anywhre

* I split the middleware into two distinct parts, so that the frontend can now determine captach requirements. PuterHomePageService can set GUI parameters for captcha requirements. The /whoarewe endpoint provides captcha requirement information and the extensuo system integration is maintained

* Fix security issues with password handling in URL query parameters

* Made sure that the enter key, submits the login request instead of refreshing the captcha

* In development we can now disable the Captcha verification system by running it with CAPTCHA_ENABLED=false npm start

* Went back and modified checkCaptcha so that it checks at the start to check what CAPTCHA_ENABLED is equal to

* Refactor captcha system to use configuration values instead of environment variables

* Fix captcha verification and align with project standards

* Update src/backend/src/modules/captcha/README.md

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>

* fix: incorrect service name

* dev: use Endpoint for captcha endpoints

Use Endpoint class, which uses eggspress behind the scenes, which handles
async errors in handlers automatically.

* dev: add extension support and simplify captcha

- removed extra error handling
- removed dormant code
- no distinction between login and signup (for now)

* clean: remove local files

* fix: undefined edge case

---------

Co-authored-by: Eric Dubé <eric.alex.dube@gmail.com>
2025-03-28 19:46:56 -04:00