Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 6a16c1e

Browse files
committed
feat: Implement plugin publishing workflow, enhance authentication with new migrations and email handling, and update web UI for improved package and dashboard management.
1 parent a030718 commit 6a16c1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+5054
-701
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to Hivemind Registry
2+
3+
on:
4+
push:
5+
tags: ["v*.*.*"]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with: { python-version: "3.12" }
15+
16+
- name: Install build tools
17+
run: pip install build hivemind-ai
18+
19+
- name: Validate plugin
20+
run: |
21+
python -c "
22+
import tomllib, sys
23+
data = tomllib.load(open('pyproject.toml','rb'))
24+
eps = data.get('project',{}).get('entry-points',{})
25+
if 'hivemind.plugins' not in eps:
26+
print('ERROR: No hivemind.plugins entry point found')
27+
sys.exit(1)
28+
print('Plugin entry point found:', eps['hivemind.plugins'])
29+
"
30+
31+
- name: Build and publish
32+
env:
33+
HIVEMIND_API_KEY: ${{ secrets.HIVEMIND_API_KEY }}
34+
HIVEMIND_REGISTRY_URL: https://registry.hivemind.rithul.dev
35+
run: hivemind plugins publish

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ env/
1919
.env
2020
.env.local
2121
.env.*.local
22+
.env.registry
23+
.env.registry.dev
24+
registry/.env
2225

2326
# Hivemind runtime and output
2427
.hivemind/
@@ -45,6 +48,7 @@ Thumbs.db
4548
.vscode/
4649
*.swp
4750
*.swo
51+
.cursor/
4852

4953
tmp
5054
**/build-errors.log

debug_users.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package main
2+
3+
import (
4+
"context"
5+
"fmt"
6+
"os"
7+
8+
"github.com/jackc/pgx/v5"
9+
)
10+
11+
func main() {
12+
url := os.Getenv("DATABASE_URL")
13+
if url == "" {
14+
fmt.Println("DATABASE_URL required")
15+
os.Exit(1)
16+
}
17+
18+
conn, err := pgx.Connect(context.Background(), url)
19+
if err != nil {
20+
fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err)
21+
os.Exit(1)
22+
}
23+
defer conn.Close(context.Background())
24+
25+
rows, _ := conn.Query(context.Background(), "SELECT id, email, username FROM users")
26+
defer rows.Close()
27+
28+
for rows.Next() {
29+
var id, email, username string
30+
rows.Scan(&id, &email, &username)
31+
fmt.Printf("User: %s (%s) - %s\n", username, email, id)
32+
33+
// List keys for this user
34+
krows, _ := conn.Query(context.Background(), "SELECT id, name, key_prefix FROM api_keys WHERE user_id = $1", id)
35+
defer krows.Close()
36+
for krows.Next() {
37+
var kid, kname, kprefix string
38+
krows.Scan(&kid, &kname, &kprefix)
39+
fmt.Printf(" Key: %s (%s) - %s\n", kname, kprefix, kid)
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)