Commit Graph

116 Commits

Author SHA1 Message Date
KernelDeimos
2735a79e6e Attempt to make BetterReader buffer and cancel 2024-04-19 01:48:07 -04:00
Sam Atkins
d1db4a11ef WIP: Some incorrect things, and logging, will clean up later
What's done here:
- Call releaseLock() on the stdin reader, which immediately cancels any
  active reads and prevents new ones.
- Adjust BetterReader to pass releaseLock() on, and handle the input
  ending, and expose how much input was read into a buffer if it's
  partially filled.
- Add an error message when the one user of read(opt_buffer) gets too
  small a buffer.

That last one is readline trying to read 1 byte, and we currently
infinitely loop on that after exiting a process. So this is definitely
not correct but it feels like it's the right direction.
2024-04-18 17:39:13 +01:00
KernelDeimos
27fb88fd75 Add a valve and internal pipe to commands 2024-04-18 15:01:35 +01:00
Sam Atkins
bec2d62e2f Phoenix: Use regular code path to run built-in apps
Now launchApp() can always be awaited, we can run built-in apps using
the same code path for other apps, and eventually have SIGINT close
them.
2024-04-18 15:00:38 +01:00
Sam Atkins
3526d5d9eb Phoenix: Wait for apps to finish executing, and connect stdio to them
After launching an app, if successful, we connect stdio streams to it,
and wait for it to exit before we return to the prompt.

stdio is implemented as regular AppConnection messages:
- stdin:  `{ $: 'stdin',  data: Uint8Array }` from phoenix -> child
- stdout: `{ $: 'stdout', data: Uint8Array }` from child -> phoenix

Terminal and Phoenix now communicate with each other using the same
style, instead of 'input' and 'output' messages. This will help with
eventually running subshells.

SIGINT currently is not sent. We also suffer from the same "one more
read from stdin happens after app exits" bug that's in
PathCommandProvider where I copied the stdin code from.
2024-04-18 15:00:38 +01:00
Sam Atkins
cce5cda640 Let AppConnection know if its target app uses the Puter SDK
Apps are not required to use the Puter SDK. If they don't, then we can
still launch them, close them, and listen to their close event, but are
unable to send messages to them.
2024-04-18 15:00:38 +01:00
Sam Atkins
f2e8b5ee3e Phoenix: Remove unwanted CSS includes 2024-04-17 11:05:03 +01:00
KernelDeimos
7e0c6c6470 Fix last_activity_ts 2024-04-16 19:30:30 -04:00
KernelDeimos
19c49db538 Improve sessions 2024-04-16 18:57:02 -04:00
KernelDeimos
653898b463 Report proper error when an operation is invalid 2024-04-15 22:27:03 -04:00
Eric Dubé
e4f2c4a28b
Merge pull request #280 from vineeth-vk11/#206
fixing on conflict issue in sqlite kv write
2024-04-15 17:55:52 -04:00
KernelDeimos
826ea36502 Add use_bundled_gui option 2024-04-15 17:50:44 -04:00
KernelDeimos
397819d45e Add missing endpoint /down 2024-04-15 16:38:03 -04:00
KernelDeimos
e8dc220981 This is 2.1.0 I decided 2024-04-15 15:37:13 -04:00
KernelDeimos
1c2b05d8f6 Fix phoenix for auto ports 2024-04-15 15:34:58 -04:00
KernelDeimos
f3495f3098 Fix xterm.css not loading 2024-04-15 14:46:16 -04:00
KernelDeimos
081b093e7e Add missing asset for xterm, fix SDK url 2024-04-15 14:43:15 -04:00
KernelDeimos
4d30753958 Fix more phoenix dev issues 2024-04-15 14:25:40 -04:00
KernelDeimos
c72e0cb0e0 Fix phoenix watcher 2024-04-15 14:08:50 -04:00
KernelDeimos
25f8dbf120 Add postinstall for phoenix 2024-04-15 14:02:49 -04:00
KernelDeimos
b21755b5a3 Fix casualty of phoenix due to Docker naming conventions 2024-04-15 12:12:28 -04:00
KernelDeimos
e71b586fe5 Invalidate cached user when the user's email address is changed 2024-04-14 23:50:39 -04:00
KernelDeimos
2fcac12340 Fixg 2024-04-14 23:24:47 -04:00
KernelDeimos
0847395c92 Socket 2024-04-14 23:10:23 -04:00
KernelDeimos
58192cacb3 Try again 2024-04-14 23:00:07 -04:00
KernelDeimos
b81284e2c6 Pass the RIGHT token to email 2024-04-14 22:49:51 -04:00
KernelDeimos
5b39e39e1f Use jwt for email change confirmation 2024-04-14 22:44:04 -04:00
KernelDeimos
b944217410 Fix 2024-04-14 22:29:54 -04:00
KernelDeimos
dca7304be9 Remove requirement of auth from email confirm 2024-04-14 22:23:42 -04:00
KernelDeimos
231878266c Fix 2024-04-14 22:08:31 -04:00
KernelDeimos
51bf8fdde6 Fix 2024-04-14 21:41:08 -04:00
KernelDeimos
18134629d2 Move 2024-04-14 21:37:12 -04:00
KernelDeimos
f6b737e45d Add confirmation email for email change 2024-04-14 21:33:15 -04:00
KernelDeimos
3b7be8a719 Add delete-own-user 2024-04-14 21:32:43 -04:00
KernelDeimos
ef0da306a8 Fix change_email 2024-04-14 20:35:34 -04:00
vineethvk11
5d8d25f370 fixing on conflict issue in sqlite kv write 2024-04-14 16:39:29 +05:30
Nariman Jelveh
255e80d077 Make Puter.js verbosity optional via debug flag. 2024-04-13 17:31:29 -07:00
KernelDeimos
965d99d137 Fix socket auth 2024-04-13 17:19:12 -04:00
KernelDeimos
df45e22813 Make node-pty not required 2024-04-13 13:56:57 -04:00
Nariman Jelveh
8db8ec3574 Update Apps.js 2024-04-12 22:04:28 -07:00
KernelDeimos
4a36670417 Update README.md files for monorepo'd projects 2024-04-12 23:54:41 -04:00
KernelDeimos
77ac503bfc Edit phoenix README.md 2024-04-12 23:49:43 -04:00
Nariman Jelveh
be55e447bb fix issue with two session managers on top of each other 2024-04-12 20:43:15 -07:00
KernelDeimos
00e9f922c0 Fix target version 2024-04-12 23:16:49 -04:00
KernelDeimos
361e51060a Update apps 2024-04-12 22:03:40 -04:00
KernelDeimos
d919b1f312 Register terminal and phoenix builtins 2024-04-12 20:56:16 -04:00
KernelDeimos
cb81579c53 Copy over phoenix 2024-04-12 20:53:44 -04:00
KernelDeimos
0306a395a2 Copy over terminal 2024-04-12 20:53:32 -04:00
KernelDeimos
5fbbfb4c18 Enable background and builtin apps 2024-04-12 20:52:57 -04:00
KernelDeimos
09c3cc6db1 Fix error when session not found 2024-04-12 01:22:33 -04:00