feat(server): add persistent terminal and notebook watcher (#5)

Use node-pty for native terminal support and chokidar for recursive cross-platform watching with atomic-save normalization. Validate terminal messages, detach clients safely, and expose debounced typed notebook events.
This commit is contained in:
Florian Schmidt
2026-11-16 00:04:45 +01:00
parent d06f4336ae
commit 7cf1ef82ba
9 changed files with 408 additions and 1 deletions
+32
View File
@@ -26,9 +26,15 @@ importers:
'@shellbook/core':
specifier: workspace:*
version: link:../../packages/core
chokidar:
specifier: ^4.0.3
version: 4.0.3
fastify:
specifier: ^5.1.0
version: 5.12.8
node-pty:
specifier: ^1.1.0
version: 1.1.0
devDependencies:
tsx:
specifier: ^4.19.2
@@ -564,6 +570,10 @@ packages:
resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==}
engines: {node: '>= 16'}
[email protected]:
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
[email protected]:
resolution: {integrity: sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw==}
engines: {node: '>=22'}
@@ -677,6 +687,12 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
[email protected]:
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
[email protected]:
resolution: {integrity: sha512-20JqtutY6JPXTUnL0ij1uad7Qe1baT46lyolh2sSENDd4sTzKZ4nmAFkeAARDKwmlLjPx6XKRlwRUxwjOy+lUg==}
[email protected]:
resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}
engines: {node: '>=14.0.0'}
@@ -718,6 +734,10 @@ packages:
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
engines: {node: '>= 6'}
[email protected]:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
[email protected]:
resolution: {integrity: sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==}
@@ -1257,6 +1277,10 @@ snapshots:
[email protected]: {}
[email protected]:
dependencies:
readdirp: 4.1.2
[email protected]: {}
[email protected]:
@@ -1422,6 +1446,12 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
node-addon-api: 7.1.1
[email protected]: {}
[email protected]:
@@ -1470,6 +1500,8 @@ snapshots:
string_decoder: 1.3.0
util-deprecate: 1.0.2
[email protected]: {}
[email protected]: {}
[email protected]: {}