@polderlabs/bizar-dash 3.0.0

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 (59) hide show
  1. package/dist/assets/index-B5X9g8B4.css +1 -0
  2. package/dist/assets/index-LqQuSp9d.js +388 -0
  3. package/dist/assets/index-LqQuSp9d.js.map +1 -0
  4. package/dist/index.html +18 -0
  5. package/package.json +67 -0
  6. package/src/cli.mjs +228 -0
  7. package/src/server/agents-store.mjs +190 -0
  8. package/src/server/api.mjs +913 -0
  9. package/src/server/browser.mjs +40 -0
  10. package/src/server/diagnostics-store.mjs +138 -0
  11. package/src/server/mods-loader.mjs +361 -0
  12. package/src/server/projects-store.mjs +198 -0
  13. package/src/server/providers-store.mjs +183 -0
  14. package/src/server/schedules-runner.mjs +150 -0
  15. package/src/server/schedules-store.mjs +233 -0
  16. package/src/server/search-store.mjs +120 -0
  17. package/src/server/server.mjs +388 -0
  18. package/src/server/state.mjs +357 -0
  19. package/src/server/tailscale-store.mjs +113 -0
  20. package/src/server/tasks-store.mjs +275 -0
  21. package/src/server/tui.mjs +844 -0
  22. package/src/server/watcher.mjs +81 -0
  23. package/src/web/App.tsx +316 -0
  24. package/src/web/components/Button.tsx +55 -0
  25. package/src/web/components/Card.tsx +40 -0
  26. package/src/web/components/EmptyState.tsx +30 -0
  27. package/src/web/components/Modal.tsx +137 -0
  28. package/src/web/components/SearchModal.tsx +185 -0
  29. package/src/web/components/Spinner.tsx +19 -0
  30. package/src/web/components/StatusBadge.tsx +25 -0
  31. package/src/web/components/Tag.tsx +28 -0
  32. package/src/web/components/Toast.tsx +142 -0
  33. package/src/web/components/Topbar.tsx +203 -0
  34. package/src/web/index.html +17 -0
  35. package/src/web/lib/api.ts +71 -0
  36. package/src/web/lib/markdown.tsx +59 -0
  37. package/src/web/lib/types.ts +388 -0
  38. package/src/web/lib/utils.ts +79 -0
  39. package/src/web/lib/ws.ts +132 -0
  40. package/src/web/main.tsx +12 -0
  41. package/src/web/styles/main.css +3148 -0
  42. package/src/web/views/Agents.tsx +406 -0
  43. package/src/web/views/Chat.tsx +527 -0
  44. package/src/web/views/Config.tsx +683 -0
  45. package/src/web/views/Mods.tsx +350 -0
  46. package/src/web/views/Overview.tsx +350 -0
  47. package/src/web/views/Plans.tsx +667 -0
  48. package/src/web/views/Schedules.tsx +299 -0
  49. package/src/web/views/Settings.tsx +571 -0
  50. package/src/web/views/Tasks.tsx +761 -0
  51. package/templates/mod/FORMAT.md +76 -0
  52. package/templates/mod/hello-mod/README.md +19 -0
  53. package/templates/mod/hello-mod/agents/greeter.md +8 -0
  54. package/templates/mod/hello-mod/commands/hello.md +6 -0
  55. package/templates/mod/hello-mod/mod.json +20 -0
  56. package/templates/mod/hello-mod/routes/ping.mjs +9 -0
  57. package/templates/mod/hello-mod/views/HelloView.tsx +10 -0
  58. package/tsconfig.json +23 -0
  59. package/vite.config.ts +24 -0
@@ -0,0 +1,76 @@
1
+ # Bizar Mods — Format Reference (v3.0.0)
2
+
3
+ A mod is a folder with a `mod.json` manifest that extends the Bizar
4
+ platform. Mods live at `~/.config/bizar/mods/<mod-id>/`.
5
+
6
+ ## Folder layout
7
+
8
+ ```
9
+ <mod-id>/
10
+ ├── mod.json # manifest (required)
11
+ ├── README.md # description (optional)
12
+ ├── agents/ # custom agents (optional)
13
+ │ └── <agent>.md
14
+ ├── commands/ # custom commands (optional)
15
+ │ └── <command>.md
16
+ ├── routes/ # custom API routes (optional)
17
+ │ └── <route>.mjs
18
+ ├── views/ # custom React views (optional)
19
+ │ └── <view>.tsx
20
+ ├── web/ # custom web assets (optional)
21
+ │ └── index.html
22
+ ├── tui/ # custom TUI components (optional)
23
+ │ └── <comp>.mjs
24
+ └── hooks/ # custom event hooks (optional)
25
+ └── <hook>.mjs
26
+ ```
27
+
28
+ ## mod.json schema
29
+
30
+ ```json
31
+ {
32
+ "id": "my-mod",
33
+ "name": "My Mod",
34
+ "version": "1.0.0",
35
+ "author": "name",
36
+ "description": "...",
37
+ "bizar": ">=3.0.0",
38
+ "type": "agent" | "command" | "view" | "route" | "tui" | "full",
39
+ "enabled": true,
40
+ "permissions": ["read:agents", "write:tasks"],
41
+ "entry": {
42
+ "agent": "agents/my-agent.md",
43
+ "command": "commands/my-command.md",
44
+ "route": "routes/my-route.mjs",
45
+ "view": "views/my-view.tsx",
46
+ "tui": "tui/my-comp.mjs"
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Permissions (v3.0.0)
52
+
53
+ `permissions` is a hint to the user. v3 doesn't enforce it yet — the
54
+ runtime is permissive. Future versions will gate operations by
55
+ permission.
56
+
57
+ Common permission strings:
58
+ - `read:agents`
59
+ - `write:agents`
60
+ - `read:tasks`
61
+ - `write:tasks`
62
+ - `read:projects`
63
+ - `write:projects`
64
+ - `read:schedules`
65
+ - `write:schedules`
66
+ - `read:config`
67
+ - `write:config`
68
+
69
+ ## Lifecycle
70
+
71
+ - The dashboard scans `~/.config/bizar/mods/` on startup.
72
+ - For each mod with `enabled: true`, the loader exposes its agents,
73
+ commands, and views in the dashboard.
74
+ - v3 doesn't dynamically mount mod routes or render mod views — those
75
+ are planned for v3.1+. Mods that ship today can still install custom
76
+ agents and commands.
@@ -0,0 +1,19 @@
1
+ # Hello Mod
2
+
3
+ A sample mod that ships with the Bizar platform. It demonstrates:
4
+
5
+ - A `mod.json` manifest with permissions and an `entry` block
6
+ - A sample agent (`agents/greeter.md`)
7
+ - A slash command (`commands/hello.md`)
8
+ - A route module (`routes/ping.mjs`) — the v3.1+ runtime will mount it
9
+ - A view metadata file (`views/HelloView.tsx`) — the v3.1+ dashboard
10
+ will render it as a tab
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ # from the bizarre-dash package root
16
+ bizar-dash mod install ./templates/mod/hello-mod
17
+ ```
18
+
19
+ Or copy the folder into `~/.config/bizar/mods/hello-mod/` by hand.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Greets the user with a friendly hello.
3
+ mode: subagent
4
+ model: anthropic/claude-3-5-sonnet
5
+ ---
6
+
7
+ You are a friendly greeter. When invoked, respond with a warm hello and
8
+ ask the user how you can help. Keep it short and friendly.
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Say hello from the Hello Mod
3
+ ---
4
+
5
+ Greet the user. Print a friendly hello and remind them that the
6
+ Hello Mod is loaded.
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "hello-mod",
3
+ "name": "Hello Mod",
4
+ "version": "1.0.0",
5
+ "author": "Bizar",
6
+ "description": "A sample mod that adds a /hello slash command, a Hello view tab, and a sample agent.",
7
+ "bizar": ">=3.0.0",
8
+ "type": "full",
9
+ "enabled": true,
10
+ "permissions": [
11
+ "read:agents",
12
+ "read:commands"
13
+ ],
14
+ "entry": {
15
+ "agent": "agents/greeter.md",
16
+ "command": "commands/hello.md",
17
+ "view": "views/HelloView.tsx"
18
+ },
19
+ "installedAt": null
20
+ }
@@ -0,0 +1,9 @@
1
+ // Sample route registration for the Hello Mod.
2
+ // v3 doesn't dynamically mount mod routes yet, but this file documents
3
+ // the intended shape for v3.1+.
4
+
5
+ export default function register({ app, state }) {
6
+ app.get('/api/mods/hello-mod/ping', (req, res) => {
7
+ res.json({ ok: true, from: 'hello-mod', ts: Date.now() });
8
+ });
9
+ }
@@ -0,0 +1,10 @@
1
+ // Sample view metadata for the Hello Mod.
2
+ // v3 doesn't dynamically mount mod views yet, but this file documents
3
+ // the intended shape for v3.1+.
4
+
5
+ export default {
6
+ id: 'hello',
7
+ label: 'Hello',
8
+ icon: 'Sparkles',
9
+ component: 'HelloView',
10
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "noUnusedLocals": false,
10
+ "noUnusedParameters": false,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "allowSyntheticDefaultImports": true,
18
+ "useDefineForClassFields": true,
19
+ "types": ["node"]
20
+ },
21
+ "include": ["src/web/**/*"],
22
+ "exclude": ["node_modules", "dist"]
23
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { dirname, resolve } from 'node:path';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+
8
+ export default defineConfig({
9
+ plugins: [react()],
10
+ root: resolve(__dirname, 'src/web'),
11
+ base: './',
12
+ build: {
13
+ outDir: resolve(__dirname, 'dist'),
14
+ emptyOutDir: true,
15
+ sourcemap: true,
16
+ rollupOptions: {
17
+ input: resolve(__dirname, 'src/web/index.html'),
18
+ },
19
+ },
20
+ server: {
21
+ port: 5174,
22
+ strictPort: false,
23
+ },
24
+ });