Commit Graph

128 Commits

Author SHA1 Message Date
Steve Korshakov
382f531d72 fix: fix logger 2025-08-26 20:53:33 -07:00
Steve Korshakov
f8cd32b4f4 debug: more state logging 2025-08-26 20:51:45 -07:00
Steve Korshakov
4040325524 fix: better logger 2025-08-26 20:48:27 -07:00
Steve Korshakov
25724eac23 wip: add some error logging to the server 2025-08-26 20:47:38 -07:00
Steve Korshakov
8158668190 wip: working on account profile 2025-08-26 20:39:55 -07:00
Steve Korshakov
305f91c6bd feat: healthcheck 2025-08-26 20:23:00 -07:00
Steve Korshakov
0f9e7ca044 Merge branch 'main' of https://github.com/slopus/happy-server 2025-08-26 20:08:38 -07:00
Steve Korshakov
941c0ef71e wip: github integration 2025-08-26 20:08:13 -07:00
Kirill Dubovitskiy
f2e6d9c6ec fix: default create machines in inactive state - since we now create them even if the daemon is not running 2025-08-21 01:33:31 -07:00
Steve Korshakov
57d183d652 feat: add db metrics 2025-08-19 23:13:23 -07:00
Steve Korshakov
28ed0f8b40 ref: remove last message (it is useless) 2025-08-19 22:56:31 -07:00
Steve Korshakov
4d5b84e4a7 ref: add http metrics 2025-08-19 19:14:27 -07:00
Steve Korshakov
84afe7c3ad ref: extract authentication and remove db query in it, add prom metric collection 2025-08-19 18:43:08 -07:00
Steve Korshakov
35299fbbdf fix: add metrics 2025-08-19 18:03:03 -07:00
Steve Korshakov
62ac1e4132 fix: remove event logging 2025-08-19 14:39:58 -07:00
Steve Korshakov
732697a402 ref: new event router 2025-08-18 19:32:10 -07:00
Steve Korshakov
3594b675a8 Merge remote-tracking branch 'origin/daemon-persistent' 2025-08-18 18:56:44 -07:00
Steve Korshakov
6f1aefc056 feat: add app-to-app authentication 2025-08-18 02:08:35 -07:00
Kirill Dubovitskiy
62a2280268 feat: daemon kinda functional e2e 2025-08-18 00:05:37 -07:00
Kirill Dubovitskiy
d03240061d refactor: prepare server for machine sync refactoring
- Clean up machine API endpoints formatting
- Update machine-alive to use ephemeral events instead of updates
- Prepare types for separated metadata and daemonState
- Fix activeAt field name consistency in machine responses

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 18:32:31 -07:00
Steve Korshakov
feb8984d86 Merge branch 'main' of https://github.com/slopus/happy-server 2025-08-16 10:17:15 -07:00
Steve Korshakov
35b4ce412c feat: add app-to-app authentication 2025-08-16 10:13:44 -07:00
Kirill Dubovitskiy
6b1a3c3e82 wip: emit machine updates on heartbeat for real-time status
- Machine-alive handler now properly emits update events to all user connections
- Ensures mobile clients receive real-time machine status updates
- Fixed null handling when machine doesn't exist in database

Note: Last test was not able to spawn new session - webhook callback timing issue

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 07:12:11 -07:00
Kirill Dubovitskiy
3a804f24c8 devx: dangerous logging endpoint 2025-08-15 19:13:45 -07:00
Kirill Dubovitskiy
4006d63232 refactor: rename update-machine-metadata to update-machine
- Consistent naming with the update body type (t: 'update-machine')
- Shorter and cleaner event name
- Matches the pattern used elsewhere in the codebase

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 01:18:50 -07:00
Kirill Dubovitskiy
4212d2725e chore: remove unused mode parameter from session-alive handler
The mode parameter is not used by the server, only tracked client-side.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 00:29:08 -07:00
Kirill Dubovitskiy
597d1d262a refactor: separate session-alive and machine-alive socket events
- Remove SessionAliveEvent type and simplify event handling
- session-alive now only handles session heartbeats (requires sid)
- Add new machine-alive event for daemon heartbeats (requires machineId)
- Remove type field and coupling between session and machine events
- Add proper TypeScript types instead of using 'any'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 21:51:18 -07:00
Kirill Dubovitskiy
a4bc4d34e8 feat: Add machine persistence to database
• Add Machine model to Prisma schema
• Create /v1/machines endpoints for CRUD operations
• Persist machine metadata and track active status
• Update socket handlers for machine-scoped connections
• Convert ephemeral machine status to database persistence

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 03:30:23 -07:00
Kirill Dubovitskiy
5e06cc3947 wip: generate short lived token on the backend to send to the frontend for realtime session creation 2025-08-06 03:35:11 -07:00
Kirill Dubovitskiy
c37d749d7a feat: daemon - machine scoped sessions added 2025-08-05 02:13:22 -07:00
Steve Korshakov
4f0b4fecaf fix: fix updatedAt 2025-08-04 18:58:19 -07:00
Steve Korshakov
bc27d1a973 ref: remove last message 2025-08-04 18:27:24 -07:00
Steve Korshakov
c0cc33cfc6 ref: change root response 2025-08-02 23:09:10 -07:00
Steve Korshakov
1065d22de7 fix: trying to fix message ordering 2025-07-28 23:53:28 -07:00
Steve Korshakov
506b7a41ba ref: improve types 2025-07-27 14:04:24 -07:00
Steve Korshakov
28b5f91542 feat: add settings 2025-07-26 14:19:29 -07:00
Steve Korshakov
93b48e6e62 fix: wrap handlers in try catch to avoid crashing the server on db issues 2025-07-26 13:31:15 -07:00
Steve Korshakov
b656562e56 ref: remove updates 2025-07-26 02:24:05 -07:00
Steve Korshakov
6c0428c9d3 ref: remove transactions 2025-07-26 02:00:25 -07:00
Steve Korshakov
ae95f70372 wip: working on redis queue 2025-07-26 01:16:22 -07:00
Steve Korshakov
c8c83eaa8b fix: fix server 2025-07-25 23:42:31 -07:00
Steve Korshakov
3d3a6b40da fix: fix redis 2025-07-25 23:06:36 -07:00
Steve Korshakov
4bf0801ed9 wip: add redis 2025-07-25 22:41:09 -07:00
Steve Korshakov
2f853017ee fix: fix deadlock 2025-07-24 22:21:18 -07:00
Steve Korshakov
e07e79ae2f feat: usage collection 2025-07-21 00:50:07 -07:00
Kirill Dubovitskiy
9cf6b979da devx: easier way to run the server + debugger 2025-07-19 00:02:26 -07:00
Kirill Dubovitskiy
40b98cdc17 fix: actually shut down server on ctrl+c 2025-07-19 00:02:26 -07:00
Steve Korshakov
7dcb7f30af fix: missing account id in response 2025-07-18 23:33:44 -07:00
Steve Korshakov
c17aaf25cb fix: fix localId 2025-07-18 23:02:35 -07:00
Steve Korshakov
4e14898e97 feat: add scoped auth 2025-07-18 21:48:33 -07:00
Steve Korshakov
93c55df649 feat: add push tokens 2025-07-17 20:31:18 -07:00
Steve Korshakov
332ad7b91c ref: implement localId on server side 2025-07-17 20:21:19 -07:00
Steve Korshakov
bed3f87cba feat: add localId 2025-07-17 20:18:35 -07:00
Kirill Dubovitskiy
0b3017ef1b fix: distinguish between session / user scoped (mobile) connections 2025-07-17 02:28:19 -07:00
Steve Korshakov
1ace32e5c3 feat: add ping 2025-07-16 22:37:28 -07:00
Steve Korshakov
ec3c1ed147 feat: add rpc logging 2025-07-14 20:28:25 -07:00
Steve Korshakov
1f9bf24af3 feat: add rpc call between sockets 2025-07-14 19:41:15 -07:00
Steve Korshakov
e2854faaa8 feat: add update state 2025-07-14 19:21:39 -07:00
Steve Korshakov
0ccdef14ff feat: add metadata version, agent state, version, add netadata change 2025-07-14 18:47:47 -07:00
Steve Korshakov
51f3656554 fix: fix not sending whole ephemeral update 2025-07-13 21:49:19 -07:00
Steve Korshakov
bff8fdef77 feat: support thinking status 2025-07-13 21:33:38 -07:00
Steve Korshakov
751f306531 fix: fix timeouts 2025-07-13 21:06:48 -07:00
Steve Korshakov
65b4df7343 fix: fix missing metadata 2025-07-13 21:02:31 -07:00
Steve Korshakov
d2a35ca842 feat: add session online states 2025-07-13 20:31:41 -07:00
Steve Korshakov
5aa597186a feat: add metadata field to session 2025-07-13 20:11:44 -07:00
Steve Korshakov
98d14fc1d6 ref: revert update types 2025-07-13 15:12:55 -07:00
Steve Korshakov
58e5d13fee fix: fix update types 2025-07-13 15:05:05 -07:00
Steve Korshakov
ff59c1c8b3 ref: change message update message 2025-07-13 13:55:10 -07:00
Steve Korshakov
4853e0ed52 feat: new session update 2025-07-13 13:18:01 -07:00
Steve Korshakov
b0735b28a3 ref: move message sending to socket 2025-07-13 13:04:49 -07:00
Steve Korshakov
c99c1d91e1 ref: improve api 2025-07-12 23:23:04 -07:00
Steve Korshakov
c751758017 ref: remove logging 2025-07-12 21:22:06 -07:00
Steve Korshakov
17e034a29e ref: debug socket io 2025-07-12 21:15:19 -07:00
Steve Korshakov
6b529bef20 ref: add logs 2025-07-12 20:53:36 -07:00
Steve Korshakov
e2322b7e2d ref: add session resolving and socketio 2025-07-12 20:45:15 -07:00
Steve Korshakov
d70ec6c720 feat: add logger 2025-07-12 20:09:02 -07:00
Steve Korshakov
bf6457753b ref: use anoter master secret 2025-07-12 18:23:47 -07:00
Steve Korshakov
240023e8b3 feat: initial version 2025-07-12 17:57:05 -07:00