agent-hub-sdd 0.1.7 → 0.1.8

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 CHANGED
@@ -15,10 +15,10 @@ npm run app
15
15
  Pelo npm (precisa do Node 20+ no PATH):
16
16
 
17
17
  ```powershell
18
- npx --yes agent-hub-sdd@0.1.7
18
+ npx --yes agent-hub-sdd@0.1.8
19
19
  ```
20
20
 
21
- Na primeira abertura a janela diz que está compilando. O **N** no canto é o Next.js em modo dev, não o app. Sem `@0.1.7`, o Windows pode reusar cache antigo.
21
+ Na primeira abertura a janela diz que está compilando. O **N** no canto é o Next.js em modo dev, não o app. Sem `@0.1.8`, o Windows pode reusar cache antigo.
22
22
 
23
23
  Se ainda abrir a 0.1.2, ou se o npm disser `EBUSY` / `resource busy or locked`, o Next da tentativa antiga ainda está com o cache aberto. O `Stop-Process electron` não mata esse `node`:
24
24
 
@@ -27,13 +27,13 @@ Get-CimInstance Win32_Process | Where-Object {
27
27
  $_.CommandLine -and ($_.CommandLine -match 'agent-hub|_npx|next dev|43147')
28
28
  } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }
29
29
  Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx" -ErrorAction SilentlyContinue
30
- npx --yes agent-hub-sdd@0.1.7
30
+ npx --yes agent-hub-sdd@0.1.8
31
31
  ```
32
32
 
33
33
  Instalar global evita o rename do `npx` nessa pasta:
34
34
 
35
35
  ```powershell
36
- npm install -g agent-hub-sdd@0.1.7
36
+ npm install -g agent-hub-sdd@0.1.8
37
37
  agent-hub-sdd
38
38
  ```
39
39
 
package/electron/main.mjs CHANGED
@@ -188,7 +188,7 @@ function createWindow() {
188
188
  preload: path.join(here, "preload.cjs"),
189
189
  contextIsolation: true,
190
190
  nodeIntegration: false,
191
- sandbox: true,
191
+ sandbox: false,
192
192
  },
193
193
  });
194
194
  win.once("ready-to-show", () => win.show());
@@ -207,6 +207,13 @@ function createWindow() {
207
207
  void shell.openExternal(url);
208
208
  return { action: "deny" };
209
209
  });
210
+ const paint = () => {
211
+ const cssFile = path.join(hubDir(), "src", "app", "shell.css");
212
+ if (!fs.existsSync(cssFile)) return;
213
+ void win.webContents.insertCSS(fs.readFileSync(cssFile, "utf8"));
214
+ };
215
+ win.webContents.on("did-finish-load", paint);
216
+ win.webContents.on("did-navigate", paint);
210
217
  }
211
218
 
212
219
  ipcMain.handle("pick-folder", async () => {
@@ -21,7 +21,7 @@ describe("stageHub", () => {
21
21
  temps.push(root);
22
22
  const pkg = path.join(root, "node_modules", "agent-hub-sdd");
23
23
  fs.mkdirSync(path.join(pkg, "src", "components"), { recursive: true });
24
- fs.writeFileSync(path.join(pkg, "package.json"), JSON.stringify({ name: "agent-hub-sdd", version: "0.1.7" }));
24
+ fs.writeFileSync(path.join(pkg, "package.json"), JSON.stringify({ name: "agent-hub-sdd", version: "0.1.8" }));
25
25
  fs.writeFileSync(path.join(pkg, "postcss.config.mjs"), "export default { plugins: {} };\n");
26
26
  fs.writeFileSync(path.join(pkg, "src", "components", "desktop-chrome.tsx"), "export const DesktopChrome = () => null;\n");
27
27
  fs.writeFileSync(path.join(root, "node_modules", "sentinel"), "ok");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-hub-sdd",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Agent Hub",
@@ -8,4 +8,4 @@ Get-CimInstance Win32_Process |
8
8
  Stop-Process -Name electron -Force
9
9
  $npx = Join-Path $env:LOCALAPPDATA "npm-cache\_npx"
10
10
  if (Test-Path $npx) { Remove-Item -Recurse -Force $npx }
11
- Write-Host "Cache do npx limpo. Rode: npx --yes agent-hub-sdd@0.1.7"
11
+ Write-Host "Cache do npx limpo. Rode: npx --yes agent-hub-sdd@0.1.8"
@@ -1,9 +1,12 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
1
3
  import type { Metadata } from "next";
2
4
  import { DesktopChrome } from "@/components/desktop-chrome";
3
5
  import { TooltipProvider } from "@/components/ui/tooltip";
4
- import "./fallback.css";
5
6
  import "./globals.css";
6
7
 
8
+ const SHELL_CSS = fs.readFileSync(path.join(process.cwd(), "src/app/shell.css"), "utf8");
9
+
7
10
  export const metadata: Metadata = {
8
11
  title: "Agent Hub",
9
12
  description: "Harness visual local para agentes do SDLC",
@@ -13,6 +16,7 @@ export default function RootLayout({ children }: LayoutProps<"/">) {
13
16
  return (
14
17
  <html lang="pt-BR" className="dark h-full antialiased">
15
18
  <body className="flex min-h-dvh flex-col bg-black text-zinc-100">
19
+ <style id="agent-hub-shell" dangerouslySetInnerHTML={{ __html: SHELL_CSS }} />
16
20
  <TooltipProvider>
17
21
  <DesktopChrome />
18
22
  {children}
@@ -0,0 +1,74 @@
1
+ html, body {
2
+ margin: 0;
3
+ min-height: 100%;
4
+ background: #000;
5
+ color: #f4f4f5;
6
+ font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
7
+ }
8
+ a { color: inherit; text-decoration: none; }
9
+ button, input, textarea { font: inherit; color: inherit; }
10
+ button {
11
+ cursor: pointer;
12
+ background: #18181b;
13
+ border: 1px solid #27272a;
14
+ border-radius: 0.5rem;
15
+ padding: 0.25rem 0.6rem;
16
+ }
17
+ input, textarea {
18
+ background: #18181b;
19
+ border: 1px solid #27272a;
20
+ border-radius: 0.5rem;
21
+ padding: 0.35rem 0.55rem;
22
+ }
23
+ .flex { display: flex; }
24
+ .flex-col { flex-direction: column; }
25
+ .flex-1 { flex: 1 1 0%; }
26
+ .items-center { align-items: center; }
27
+ .justify-center { justify-content: center; }
28
+ .min-h-0 { min-height: 0; }
29
+ .min-h-dvh { min-height: 100dvh; }
30
+ .min-w-0 { min-width: 0; }
31
+ .h-full { height: 100%; }
32
+ .h-dvh { height: 100dvh; }
33
+ .h-9 { height: 2.25rem; }
34
+ .w-full { width: 100%; }
35
+ .w-\[280px\] { width: 280px; }
36
+ .max-w-md { max-width: 28rem; }
37
+ .max-w-\[280px\] { max-width: 280px; }
38
+ .shrink-0 { flex-shrink: 0; }
39
+ .gap-1 { gap: 0.25rem; }
40
+ .gap-2 { gap: 0.5rem; }
41
+ .gap-3 { gap: 0.75rem; }
42
+ .overflow-hidden { overflow: hidden; }
43
+ .overflow-auto { overflow: auto; }
44
+ .grid { display: grid; }
45
+ .hidden { display: none; }
46
+ .border { border: 1px solid #27272a; }
47
+ .border-r { border-right: 1px solid #27272a; }
48
+ .border-b { border-bottom: 1px solid #27272a; }
49
+ .border-zinc-800 { border-color: #27272a; }
50
+ .bg-black { background: #000; }
51
+ .text-zinc-100 { color: #f4f4f5; }
52
+ .text-zinc-300 { color: #d4d4d8; }
53
+ .text-zinc-400 { color: #a1a1aa; }
54
+ .text-zinc-500 { color: #71717a; }
55
+ .text-sm { font-size: 0.875rem; }
56
+ .text-xs { font-size: 0.75rem; }
57
+ .text-lg { font-size: 1.125rem; }
58
+ .font-medium { font-weight: 500; }
59
+ .font-semibold { font-weight: 600; }
60
+ .p-3 { padding: 0.75rem; }
61
+ .p-4 { padding: 1rem; }
62
+ .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
63
+ .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
64
+ .pr-8 { padding-right: 2rem; }
65
+ .rounded-lg { border-radius: 0.5rem; }
66
+ .rounded-full { border-radius: 9999px; }
67
+ .leading-6 { line-height: 1.5rem; }
68
+ .text-center { text-align: center; }
69
+ .ah-drag { -webkit-app-region: drag; app-region: drag; }
70
+ .ah-no-drag { -webkit-app-region: no-drag; app-region: no-drag; }
71
+ @media (min-width: 768px) {
72
+ .md\:block { display: block; }
73
+ .md\:hidden { display: none; }
74
+ }
@@ -1,118 +0,0 @@
1
- /* Vanilla fallback so the hub stays usable if Tailwind fails to bundle (npx/webpack). */
2
- html,
3
- body {
4
- margin: 0;
5
- min-height: 100%;
6
- background: #000;
7
- color: #f4f4f5;
8
- font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
9
- }
10
-
11
- a {
12
- color: inherit;
13
- text-decoration: none;
14
- }
15
-
16
- button,
17
- input,
18
- textarea {
19
- font: inherit;
20
- color: inherit;
21
- }
22
-
23
- button {
24
- cursor: pointer;
25
- background: #18181b;
26
- border: 1px solid #27272a;
27
- border-radius: 0.5rem;
28
- padding: 0.25rem 0.6rem;
29
- }
30
-
31
- input,
32
- textarea {
33
- background: #18181b;
34
- border: 1px solid #27272a;
35
- border-radius: 0.5rem;
36
- padding: 0.35rem 0.55rem;
37
- }
38
-
39
- .flex {
40
- display: flex;
41
- }
42
- .flex-col {
43
- flex-direction: column;
44
- }
45
- .flex-1 {
46
- flex: 1 1 0%;
47
- }
48
- .min-h-0 {
49
- min-height: 0;
50
- }
51
- .min-w-0 {
52
- min-width: 0;
53
- }
54
- .h-full {
55
- height: 100%;
56
- }
57
- .h-dvh {
58
- height: 100dvh;
59
- }
60
- .w-full {
61
- width: 100%;
62
- }
63
- .shrink-0 {
64
- flex-shrink: 0;
65
- }
66
- .gap-1 {
67
- gap: 0.25rem;
68
- }
69
- .gap-2 {
70
- gap: 0.5rem;
71
- }
72
- .gap-3 {
73
- gap: 0.75rem;
74
- }
75
- .overflow-hidden {
76
- overflow: hidden;
77
- }
78
- .border-r {
79
- border-right: 1px solid #27272a;
80
- }
81
- .border-b {
82
- border-bottom: 1px solid #27272a;
83
- }
84
- .bg-black {
85
- background: #000;
86
- }
87
- .text-zinc-100 {
88
- color: #f4f4f5;
89
- }
90
- .text-zinc-400 {
91
- color: #a1a1aa;
92
- }
93
- .text-sm {
94
- font-size: 0.875rem;
95
- }
96
- .p-3 {
97
- padding: 0.75rem;
98
- }
99
- .px-2 {
100
- padding-left: 0.5rem;
101
- padding-right: 0.5rem;
102
- }
103
- .py-2 {
104
- padding-top: 0.5rem;
105
- padding-bottom: 0.5rem;
106
- }
107
- .grid {
108
- display: grid;
109
- }
110
-
111
- @media (min-width: 768px) {
112
- .md\:block {
113
- display: block;
114
- }
115
- .md\:hidden {
116
- display: none;
117
- }
118
- }