@flame0510/project-aether 1.8.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/agents/PageClient.tsx +3 -0
- package/app/agents/create/loading.tsx +51 -0
- package/app/agents/loading.tsx +2 -11
- package/app/api/agents/create/route.ts +6 -0
- package/app/api/assistant/route.ts +1 -1
- package/app/components/Skeleton.tsx +45 -0
- package/app/config/loading.tsx +4 -9
- package/app/containers/ContainersClient.tsx +4 -2
- package/app/containers/loading.tsx +2 -18
- package/app/containers/terminal/[id]/TerminalClient.tsx +230 -276
- package/app/containers/terminal/[id]/loading.tsx +20 -0
- package/app/crons/loading.tsx +4 -9
- package/app/gateway/loading.tsx +3 -7
- package/app/globals.css +10 -0
- package/app/lineage/loading.tsx +4 -9
- package/app/memory/loading.tsx +4 -9
- package/app/plugins/loading.tsx +4 -9
- package/app/skills/loading.tsx +4 -9
- package/app/tools/loading.tsx +4 -9
- package/bin/rev4a.js +8 -4
- package/docs/ARCHITECTURE.md +14 -24
- package/docs/CONTAINER-TERMINAL.md +169 -261
- package/docs/FRONTEND-ARCHITECTURE.md +2 -1
- package/docs/REV4A.md +4 -2
- package/docs/dev/API-REFERENCE.md +21 -5
- package/docs/rag/GLOSSARY.md +1 -1
- package/docs/rag/REV4A-OVERVIEW.md +1 -1
- package/lib/agent-recreate.ts +3 -0
- package/package.json +5 -1
- package/server.js +183 -0
- package/terminal-ws-server.js +329 -96
package/app/memory/loading.tsx
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListPageSkeleton } from '../components/Skeleton';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<CardRowSkeleton count={5} height={48} />
|
|
7
|
-
</div>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default PageSkeleton;
|
|
3
|
+
export default function MemoryLoading() {
|
|
4
|
+
return <ListPageSkeleton />;
|
|
5
|
+
}
|
package/app/plugins/loading.tsx
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListPageSkeleton } from '../components/Skeleton';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<CardRowSkeleton count={5} height={48} />
|
|
7
|
-
</div>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default PageSkeleton;
|
|
3
|
+
export default function PluginsLoading() {
|
|
4
|
+
return <ListPageSkeleton />;
|
|
5
|
+
}
|
package/app/skills/loading.tsx
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListPageSkeleton } from '../components/Skeleton';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<CardRowSkeleton count={5} height={48} />
|
|
7
|
-
</div>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default PageSkeleton;
|
|
3
|
+
export default function SkillsLoading() {
|
|
4
|
+
return <ListPageSkeleton />;
|
|
5
|
+
}
|
package/app/tools/loading.tsx
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListPageSkeleton } from '../components/Skeleton';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<CardRowSkeleton count={5} height={48} />
|
|
7
|
-
</div>
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
export default PageSkeleton;
|
|
3
|
+
export default function ToolsLoading() {
|
|
4
|
+
return <ListPageSkeleton />;
|
|
5
|
+
}
|
package/bin/rev4a.js
CHANGED
|
@@ -513,14 +513,18 @@ function serve(port) {
|
|
|
513
513
|
|
|
514
514
|
const children = [];
|
|
515
515
|
const wsPort = process.env.TERMINAL_WS_PORT || '3741';
|
|
516
|
+
// Shared by server.js (which forwards the terminal WebSocket after checking the session)
|
|
517
|
+
// and the terminal server (which refuses anything without it). New at every start.
|
|
518
|
+
const terminalSecret = require('crypto').randomBytes(32).toString('hex');
|
|
516
519
|
|
|
517
520
|
log('SERVE', `Starting Rev4a on port ${port}…`);
|
|
518
521
|
|
|
519
|
-
// Next.js
|
|
520
|
-
|
|
522
|
+
// Next.js, through server.js: the same pages and API, plus the terminal WebSocket on
|
|
523
|
+
// this port (so the terminal needs no reverse proxy in front).
|
|
524
|
+
const next = spawn(process.execPath, ['server.js'], {
|
|
521
525
|
cwd: ROOT,
|
|
522
526
|
stdio: 'inherit',
|
|
523
|
-
env: childEnv,
|
|
527
|
+
env: { ...childEnv, TERMINAL_WS_PORT: wsPort, REV4A_TERMINAL_SECRET: terminalSecret },
|
|
524
528
|
});
|
|
525
529
|
children.push(next);
|
|
526
530
|
log('SERVE', `Next.js PID ${next.pid}`);
|
|
@@ -538,7 +542,7 @@ function serve(port) {
|
|
|
538
542
|
const ws = spawn(process.execPath, ['terminal-ws-server.js'], {
|
|
539
543
|
cwd: ROOT,
|
|
540
544
|
stdio: 'inherit',
|
|
541
|
-
env: { ...childEnv, TERMINAL_WS_PORT: wsPort },
|
|
545
|
+
env: { ...childEnv, TERMINAL_WS_PORT: wsPort, REV4A_TERMINAL_SECRET: terminalSecret },
|
|
542
546
|
});
|
|
543
547
|
children.push(ws);
|
|
544
548
|
log('SERVE', `Terminal WS PID ${ws.pid}`);
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
**Credentials vault:** The `/credentials` page stores third-party service tokens in `credentials.db` and installs them into containers on explicit sync. Provider API keys live separately in `provider-keys.json`, managed from the Gateway UI.
|
|
74
74
|
|
|
75
|
-
**Container management UI:** The `/containers` page lists all Docker containers, running or stopped, with status, image, IP and ports, and opens a web terminal into any
|
|
75
|
+
**Container management UI:** The `/containers` page lists all Docker containers, running or stopped, with status, image, IP and ports, and opens a web terminal into any running one. Fully functional. (Machine CPU, RAM and disk are on `/system`.)
|
|
76
76
|
|
|
77
77
|
**Workspace API:** Lazy-loaded file tree explorer with real-time reads (no caching), supports both host and container workspaces via `docker exec`.
|
|
78
78
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
| Feature | Status | Notes |
|
|
82
82
|
|---|---|---|
|
|
83
83
|
| Credentials (UI + API) | 🟢 Implemented | SQLite, no encryption yet |
|
|
84
|
-
| Container page | 🟢 Functional | Lists all containers, web terminal |
|
|
84
|
+
| Container page | 🟢 Functional | Lists all containers, web terminal (xterm.js, no proxy needed) |
|
|
85
85
|
| Agent creation wizard | 🟢 Implemented | One-click create with model/template selection |
|
|
86
86
|
| Provider proxy | 🟢 Implemented | Agents route through Rev4a provider gateway |
|
|
87
87
|
| Shared volumes | 🟢 Implemented | Skills + repos mounted on all agents |
|
|
@@ -749,39 +749,29 @@ ALTER TABLE sessions ADD COLUMN ended_at INTEGER;
|
|
|
749
749
|
|
|
750
750
|
## 11. Container Terminal
|
|
751
751
|
|
|
752
|
-
Rev4a provides a real, interactive terminal
|
|
753
|
-
|
|
752
|
+
Rev4a provides a real, interactive terminal (xterm.js in the browser, a PTY via
|
|
753
|
+
`node-pty` on the host) for any running container. Details in
|
|
754
754
|
[docs/CONTAINER-TERMINAL.md](CONTAINER-TERMINAL.md).
|
|
755
755
|
|
|
756
|
-
### Two-process architecture
|
|
757
|
-
|
|
758
756
|
| Process | Port | Role |
|
|
759
757
|
|---|---|---|
|
|
760
|
-
|
|
|
761
|
-
| `terminal-ws-server.js` | 3741 (127.0.0.1) |
|
|
762
|
-
|
|
763
|
-
Both are started by `rev4a serve`; the terminal server is a process of its own to avoid
|
|
764
|
-
event-loop contention with Next.js during high-throughput I/O. It has no authentication
|
|
765
|
-
of its own and is reachable only through a reverse proxy route (see
|
|
766
|
-
[CONTAINER-TERMINAL.md](CONTAINER-TERMINAL.md#routing)).
|
|
767
|
-
|
|
768
|
-
### Why custom DOM over xterm.js
|
|
769
|
-
|
|
770
|
-
The initial implementation used xterm.js (both canvas and DOM renderers).
|
|
771
|
-
Both suffered from black-screen-on-large-output and broken scrolling due to
|
|
772
|
-
CSS conflicts. The current implementation uses a plain `<div>` with native
|
|
773
|
-
browser scrolling and a hidden `<textarea>` for input — stable under any
|
|
774
|
-
output volume.
|
|
758
|
+
| `server.js` | 3740 | Next.js (pages, API) plus the WebSocket upgrade on `/api/terminal-ws` |
|
|
759
|
+
| `terminal-ws-server.js` | 3741 (127.0.0.1) | The PTYs and their sessions |
|
|
775
760
|
|
|
776
|
-
|
|
777
|
-
|
|
761
|
+
Both are started by `rev4a serve`. The browser opens the terminal on the dashboard's own
|
|
762
|
+
port, so no reverse proxy is needed. `server.js` checks the session cookie, the Origin and
|
|
763
|
+
the container name, then forwards the handshake with a per-boot secret the terminal server
|
|
764
|
+
requires; the terminal server is a process of its own so heavy shell output never stalls
|
|
765
|
+
the dashboard. A shell survives a dropped connection for 2 minutes and is resumed by the
|
|
766
|
+
same session id.
|
|
778
767
|
|
|
779
768
|
## 12. Technology Stack
|
|
780
769
|
|
|
781
770
|
| Layer | Technology | Notes |
|
|
782
771
|
|---|---|---|
|
|
783
772
|
| Orchestrator | Docker / Docker Compose | Already in use |
|
|
784
|
-
| Dashboard | Next.js 16 + React 19 | Current Rev4a |
|
|
773
|
+
| Dashboard | Next.js 16 + React 19 | Current Rev4a, served by `server.js` (Next's programmatic API) |
|
|
774
|
+
| Container terminal | xterm.js 6 (browser) + node-pty + `ws` | `docker exec` PTYs, sessions resumable for 2 minutes — `docs/CONTAINER-TERMINAL.md` |
|
|
785
775
|
| Provider Gateway | Express/Fastify (Node.js) | To implement in Rev4a |
|
|
786
776
|
| Database | SQLite (WAL mode) | Current `events.db`, may need to scale |
|
|
787
777
|
| Memory | Per-agent SQLite + central index | New |
|