-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Enclave VM Streaming Runtime #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8910f20
feat: add architecture documentation for Enclave VM Streaming Runtime
frontegg-david 0b18595
Merge branch 'main' into streaming-vm
frontegg-david 084f045
feat: add initial implementation of EnclaveJS types and runtime compo…
frontegg-david dd1e91a
fix: update tsconfig to exclude additional test file types
frontegg-david 0cf6f9e
feat: add initial implementation of streaming demo with broker and cl…
frontegg-david d50b483
feat: add test utilities and broker/runtime server tests for WebSocke…
frontegg-david 807c4d9
feat: update README with installation instructions for EnclaveJS pack…
frontegg-david 86b1a1b
feat: implement event filtering system for stream events
frontegg-david d9d2e62
feat: enhance installation documentation and add overview for Vectori…
frontegg-david 2b965a6
feat: enhance event filtering with ReDoS protection and improve error…
frontegg-david bfa51c2
feat: improve WebSocket connection handling and enhance error reporting
frontegg-david f8cbea3
feat: enhance error handling and improve session management in runtim…
frontegg-david dbd8d4e
feat: improve WebSocket client handling and manage disconnect events
frontegg-david File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: "CodeQL config" | ||
|
|
||
| paths-ignore: | ||
| # Demo applications | ||
| - apps/streaming-demo | ||
| # Test files | ||
| - "**/test" | ||
| - "**/tests" | ||
| - "**/__tests__" | ||
| - "**/*.test.ts" | ||
| - "**/*.test.tsx" | ||
| - "**/*.spec.ts" | ||
| - "**/*.spec.tsx" | ||
| # Enclave VM adapters - intentionally execute user code in sandboxed VM | ||
| # Security is provided by: VM sandbox isolation, AST-guard code validation, | ||
| # and double VM architecture. The "code injection" alerts are expected behavior. | ||
| - libs/enclave-vm/src/adapters/vm-adapter.ts | ||
| - libs/enclave-vm/src/adapters/worker-pool/worker-pool-adapter.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| module.exports = { | ||
| displayName: 'streaming-demo', | ||
| preset: '../../jest.preset.js', | ||
| testEnvironment: 'node', | ||
| transform: { | ||
| '^.+\\.[tj]s$': [ | ||
| 'ts-jest', | ||
| { | ||
| tsconfig: '<rootDir>/tsconfig.spec.json', | ||
| isolatedModules: true, | ||
| diagnostics: { | ||
| ignoreCodes: [151002], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| moduleFileExtensions: ['ts', 'js', 'html'], | ||
| coverageDirectory: '../../coverage/apps/streaming-demo', | ||
| collectCoverageFrom: ['src/**/*.ts', '!src/**/*.spec.ts', '!src/**/*.test.ts', '!src/**/index.ts'], | ||
| coverageReporters: ['text', 'text-summary', 'lcov', 'html', 'json'], | ||
| testTimeout: 30000, // Longer timeout for WebSocket tests | ||
| transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)', '<rootDir>/../../libs/.*/dist/'], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "streaming-demo", | ||
| "version": "0.0.1", | ||
| "private": true, | ||
| "description": "3-server demo showcasing EnclaveJS streaming architecture", | ||
| "main": "dist/broker-server.js", | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.app.json", | ||
| "broker": "ts-node src/broker-server.ts", | ||
| "client": "ts-node src/client-server.ts", | ||
| "runtime": "ts-node src/runtime-server.ts" | ||
| }, | ||
| "dependencies": { | ||
| "@enclavejs/broker": "0.1.0", | ||
| "@enclavejs/client": "0.1.0", | ||
| "@enclavejs/types": "0.1.0", | ||
| "enclave-vm": "2.7.0", | ||
| "express": "^4.21.0", | ||
| "zod": "^3.24.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/express": "^4.17.21", | ||
| "@types/node": "^22.0.0", | ||
| "ts-node": "^10.9.2", | ||
| "typescript": "^5.6.3" | ||
| }, | ||
| "type": "commonjs" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "name": "streaming-demo", | ||
| "$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
| "sourceRoot": "apps/streaming-demo/src", | ||
| "projectType": "application", | ||
| "targets": { | ||
| "build": { | ||
| "executor": "@nx/js:tsc", | ||
| "outputs": ["{options.outputPath}"], | ||
| "options": { | ||
| "outputPath": "dist/apps/streaming-demo", | ||
| "main": "apps/streaming-demo/src/broker-server.ts", | ||
| "tsConfig": "apps/streaming-demo/tsconfig.app.json", | ||
| "assets": ["apps/streaming-demo/src/public"] | ||
| } | ||
| }, | ||
| "serve:runtime": { | ||
| "executor": "nx:run-commands", | ||
| "options": { | ||
| "command": "npx tsx apps/streaming-demo/src/runtime-server.ts" | ||
| } | ||
| }, | ||
| "serve:broker": { | ||
| "executor": "nx:run-commands", | ||
| "options": { | ||
| "command": "npx tsx apps/streaming-demo/src/broker-server.ts" | ||
| } | ||
| }, | ||
| "serve:client": { | ||
| "executor": "nx:run-commands", | ||
| "options": { | ||
| "command": "npx tsx apps/streaming-demo/src/client-server.ts" | ||
| } | ||
| }, | ||
| "demo": { | ||
| "executor": "nx:run-commands", | ||
| "options": { | ||
| "commands": [ | ||
| "npx tsx apps/streaming-demo/src/runtime-server.ts", | ||
| "sleep 1 && npx tsx apps/streaming-demo/src/broker-server.ts", | ||
| "sleep 2 && npx tsx apps/streaming-demo/src/client-server.ts" | ||
| ], | ||
| "parallel": true | ||
| } | ||
| }, | ||
| "test": { | ||
| "executor": "nx:run-commands", | ||
| "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
| "options": { | ||
| "command": "NODE_OPTIONS='--experimental-vm-modules' npx jest --config apps/streaming-demo/jest.config.ts --passWithNoTests --runInBand" | ||
| } | ||
| } | ||
| }, | ||
| "tags": [] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.