@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.
- package/dist/assets/index-B5X9g8B4.css +1 -0
- package/dist/assets/index-LqQuSp9d.js +388 -0
- package/dist/assets/index-LqQuSp9d.js.map +1 -0
- package/dist/index.html +18 -0
- package/package.json +67 -0
- package/src/cli.mjs +228 -0
- package/src/server/agents-store.mjs +190 -0
- package/src/server/api.mjs +913 -0
- package/src/server/browser.mjs +40 -0
- package/src/server/diagnostics-store.mjs +138 -0
- package/src/server/mods-loader.mjs +361 -0
- package/src/server/projects-store.mjs +198 -0
- package/src/server/providers-store.mjs +183 -0
- package/src/server/schedules-runner.mjs +150 -0
- package/src/server/schedules-store.mjs +233 -0
- package/src/server/search-store.mjs +120 -0
- package/src/server/server.mjs +388 -0
- package/src/server/state.mjs +357 -0
- package/src/server/tailscale-store.mjs +113 -0
- package/src/server/tasks-store.mjs +275 -0
- package/src/server/tui.mjs +844 -0
- package/src/server/watcher.mjs +81 -0
- package/src/web/App.tsx +316 -0
- package/src/web/components/Button.tsx +55 -0
- package/src/web/components/Card.tsx +40 -0
- package/src/web/components/EmptyState.tsx +30 -0
- package/src/web/components/Modal.tsx +137 -0
- package/src/web/components/SearchModal.tsx +185 -0
- package/src/web/components/Spinner.tsx +19 -0
- package/src/web/components/StatusBadge.tsx +25 -0
- package/src/web/components/Tag.tsx +28 -0
- package/src/web/components/Toast.tsx +142 -0
- package/src/web/components/Topbar.tsx +203 -0
- package/src/web/index.html +17 -0
- package/src/web/lib/api.ts +71 -0
- package/src/web/lib/markdown.tsx +59 -0
- package/src/web/lib/types.ts +388 -0
- package/src/web/lib/utils.ts +79 -0
- package/src/web/lib/ws.ts +132 -0
- package/src/web/main.tsx +12 -0
- package/src/web/styles/main.css +3148 -0
- package/src/web/views/Agents.tsx +406 -0
- package/src/web/views/Chat.tsx +527 -0
- package/src/web/views/Config.tsx +683 -0
- package/src/web/views/Mods.tsx +350 -0
- package/src/web/views/Overview.tsx +350 -0
- package/src/web/views/Plans.tsx +667 -0
- package/src/web/views/Schedules.tsx +299 -0
- package/src/web/views/Settings.tsx +571 -0
- package/src/web/views/Tasks.tsx +761 -0
- package/templates/mod/FORMAT.md +76 -0
- package/templates/mod/hello-mod/README.md +19 -0
- package/templates/mod/hello-mod/agents/greeter.md +8 -0
- package/templates/mod/hello-mod/commands/hello.md +6 -0
- package/templates/mod/hello-mod/mod.json +20 -0
- package/templates/mod/hello-mod/routes/ping.mjs +9 -0
- package/templates/mod/hello-mod/views/HelloView.tsx +10 -0
- package/tsconfig.json +23 -0
- 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,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
|
+
}
|
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
|
+
});
|