@stacksjs/defaults 0.75.74 → 0.75.76

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.
Files changed (28) hide show
  1. package/ai/skills/stacks-actions/SKILL.md +1 -1
  2. package/ai/skills/stacks-dashboard/SKILL.md +42 -7
  3. package/ai/skills/stacks-payments/SKILL.md +11 -0
  4. package/app/Actions/Dashboard/DashboardHomeAction.test.ts +33 -1
  5. package/app/Actions/Dashboard/DashboardHomeAction.ts +63 -25
  6. package/app/Actions/Dashboard/Remote/RemoteCommandIndexAction.ts +3 -0
  7. package/app/Actions/Dashboard/Remote/RemoteTerminalCloseAction.ts +25 -0
  8. package/app/Actions/Dashboard/Remote/RemoteTerminalInputAction.ts +25 -0
  9. package/app/Actions/Dashboard/Remote/RemoteTerminalOpenAction.ts +39 -0
  10. package/app/Actions/Dashboard/Remote/RemoteTerminalResizeAction.ts +25 -0
  11. package/app/Actions/Dashboard/Remote/RemoteTerminalStreamAction.ts +36 -0
  12. package/app/Actions/Dashboard/Remote/remote-commands.ts +30 -1
  13. package/app/Actions/Dashboard/Remote/remote-routes.test.ts +4 -4
  14. package/app/Actions/Dashboard/Remote/remote-terminal.test.ts +463 -0
  15. package/app/Actions/Dashboard/Remote/remote-terminal.ts +399 -0
  16. package/app/Actions/Dashboard/Remote/ssh-runner.ts +82 -1
  17. package/app/Actions/Dashboard/Remote/terminal-sessions.ts +80 -0
  18. package/functions/dashboard-api.ts +13 -0
  19. package/functions/remote-terminal-element.ts +287 -0
  20. package/functions/remote.test.ts +52 -0
  21. package/functions/remote.ts +136 -0
  22. package/functions/xterm-styles.d.ts +9 -0
  23. package/ide/vscode/package.json +1 -1
  24. package/package.json +5 -3
  25. package/resources/components/Dashboard/Remote/RemoteConsole.stx +162 -0
  26. package/resources/functions/dashboard/sidebar.ts +3 -0
  27. package/routes/dashboard-api.ts +7 -0
  28. package/views/dashboard/remote/index.stx +8 -0
@@ -477,6 +477,9 @@ export function buildNavSections(
477
477
  const managementItems: NavItem[] = [
478
478
  { to: '/cloud', icon: 'cloud', text: 'Cloud' },
479
479
  { to: '/servers', icon: 'server', text: 'Servers' },
480
+ // Named commands and terminals on configured hosts (stacksjs/stacks#960).
481
+ // Hidden from client-role viewers; the gates decide who may use it.
482
+ { to: '/remote', icon: 'terminal', text: 'Remote', roles: ['admin', 'dev'] },
480
483
  { to: '/serverless', icon: 'zap', text: 'Serverless' },
481
484
  { to: '/dns', icon: 'globe-search', text: 'DNS' },
482
485
  { to: '/management/permissions', icon: 'lock', text: 'Permissions' },
@@ -282,6 +282,13 @@ route.group({ prefix: '/api/dashboard', apiResponse: true }, () => {
282
282
  */
283
283
  authenticatedGuard(route.get('/remote/commands', 'Actions/Dashboard/Remote/RemoteCommandIndexAction'))
284
284
  authenticatedGuard(route.post('/remote/run', 'Actions/Dashboard/Remote/RemoteCommandRunAction'))
285
+ // Interactive terminals into hosts that opt in with `terminal: true`,
286
+ // authorized by the `open-remote-terminal` gate. Same guard, same reason.
287
+ authenticatedGuard(route.post('/remote/terminals', 'Actions/Dashboard/Remote/RemoteTerminalOpenAction'))
288
+ authenticatedGuard(route.get('/remote/terminals/{id}/stream', 'Actions/Dashboard/Remote/RemoteTerminalStreamAction'))
289
+ authenticatedGuard(route.post('/remote/terminals/{id}/input', 'Actions/Dashboard/Remote/RemoteTerminalInputAction'))
290
+ authenticatedGuard(route.post('/remote/terminals/{id}/resize', 'Actions/Dashboard/Remote/RemoteTerminalResizeAction'))
291
+ authenticatedGuard(route.delete('/remote/terminals/{id}', 'Actions/Dashboard/Remote/RemoteTerminalCloseAction'))
285
292
 
286
293
  guard(route.get('/ci/status', 'Actions/Dashboard/Ci/StatusAction'))
287
294
  // CI drilldown (stacksjs/stacks#1848): per-repo run history + per-run
@@ -0,0 +1,8 @@
1
+ @extends('layouts/default')
2
+
3
+ @section('content')
4
+ @title('Dashboard - Remote')
5
+ <PageLayout>
6
+ <RemoteConsole />
7
+ </PageLayout>
8
+ @endsection