step 1: rename module chat-switchboard → switchboard-core
- go.mod module name
- All 714 import references across 289 Go files
- VERSION: 0.1.0
- CI DB names: switchboard_core_{ci,dev,test}
- Docker image: gobha/switchboard-core
- Test fixtures: JWT issuer, repo names
- .env.example, docker-compose container name
- Compiles clean (go build exit 0)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# .gitea/workflows/ci.yaml
|
||||
# ============================================
|
||||
# Chat Switchboard - CI/CD Pipeline (v0.17.3)
|
||||
# Switchboard Core - CI/CD Pipeline (v0.17.3)
|
||||
# ============================================
|
||||
# Cluster deployments use SEPARATE FE + BE images.
|
||||
# Unified image is for Docker Hub only (docker-compose use).
|
||||
@@ -44,7 +44,7 @@
|
||||
# - Bootstrap uses IF NOT EXISTS (idempotent)
|
||||
# - Dev wipe REFUSES to run on databases not ending in _dev
|
||||
# - Admin creds never reach the backend pods
|
||||
# - Each env has its own DB name (chat_switchboard_{dev,test,})
|
||||
# - Each env has its own DB name (switchboard_core_{dev,test,})
|
||||
#
|
||||
# Required Gitea Variables:
|
||||
# REGISTRY, NAMESPACE, DOMAIN, POSTGRES_HOST
|
||||
@@ -90,7 +90,7 @@ env:
|
||||
POSTGRES_PORT: ${{ vars.POSTGRES_PORT || '5432' }}
|
||||
FE_IMAGE: ${{ vars.REGISTRY }}/xcaliber/switchboard-fe
|
||||
BE_IMAGE: ${{ vars.REGISTRY }}/xcaliber/switchboard-be
|
||||
DOCKERHUB_IMAGE: ${{ vars.DOCKERHUB_IMAGE || 'gobha/chat-switchboard' }}
|
||||
DOCKERHUB_IMAGE: ${{ vars.DOCKERHUB_IMAGE || 'gobha/switchboard-core' }}
|
||||
|
||||
jobs:
|
||||
# ── Stage 0: Detect Changed Paths ──────────────
|
||||
@@ -326,7 +326,7 @@ jobs:
|
||||
PGPASSWORD: ${{ secrets.POSTGRES_ADMIN_PASSWORD }}
|
||||
APP_USER: ${{ secrets.POSTGRES_USER }}
|
||||
APP_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
||||
DB_NAME: chat_switchboard_ci
|
||||
DB_NAME: switchboard_core_ci
|
||||
run: |
|
||||
echo "━━━ CI Test Database Setup ━━━"
|
||||
# Create DB for Go integration tests (admin creds)
|
||||
@@ -370,7 +370,7 @@ jobs:
|
||||
PGUSER: ${{ secrets.POSTGRES_ADMIN_USER }}
|
||||
PGPASSWORD: ${{ secrets.POSTGRES_ADMIN_PASSWORD }}
|
||||
run: |
|
||||
psql -c "DROP DATABASE IF EXISTS chat_switchboard_ci;" postgres
|
||||
psql -c "DROP DATABASE IF EXISTS switchboard_core_ci;" postgres
|
||||
echo "✓ Dropped CI test database"
|
||||
|
||||
# ── Stage 2: Build, Database, Deploy ─────────
|
||||
@@ -413,7 +413,7 @@ jobs:
|
||||
echo "IMAGE_TAG=dev" >> "$GITHUB_OUTPUT"
|
||||
echo "BASE_PATH=/dev" >> "$GITHUB_OUTPUT"
|
||||
echo "DEPLOY_SUFFIX=-dev" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=chat_switchboard_dev" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=switchboard_core_dev" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_WIPE=true" >> "$GITHUB_OUTPUT"
|
||||
echo "FE_REPLICAS=1" >> "$GITHUB_OUTPUT"
|
||||
echo "BE_REPLICAS=1" >> "$GITHUB_OUTPUT"
|
||||
@@ -434,7 +434,7 @@ jobs:
|
||||
echo "EXTRA_TAG=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "BASE_PATH=" >> "$GITHUB_OUTPUT"
|
||||
echo "DEPLOY_SUFFIX=" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=chat_switchboard" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=switchboard_core" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_WIPE=false" >> "$GITHUB_OUTPUT"
|
||||
echo "FE_REPLICAS=2" >> "$GITHUB_OUTPUT"
|
||||
echo "BE_REPLICAS=2" >> "$GITHUB_OUTPUT"
|
||||
@@ -454,7 +454,7 @@ jobs:
|
||||
echo "IMAGE_TAG=test" >> "$GITHUB_OUTPUT"
|
||||
echo "BASE_PATH=/test" >> "$GITHUB_OUTPUT"
|
||||
echo "DEPLOY_SUFFIX=-test" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=chat_switchboard_test" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_NAME=switchboard_core_test" >> "$GITHUB_OUTPUT"
|
||||
echo "DB_WIPE=false" >> "$GITHUB_OUTPUT"
|
||||
echo "FE_REPLICAS=1" >> "$GITHUB_OUTPUT"
|
||||
echo "BE_REPLICAS=1" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ============================================
|
||||
# Chat Switchboard — Unified Dockerfile
|
||||
# Switchboard Core — Unified Dockerfile
|
||||
# ============================================
|
||||
# Stage 1: Build Go backend
|
||||
# Stage 2: Download JS vendor libs (marked, DOMPurify)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ==========================================
|
||||
# Chat Switchboard - Frontend Dockerfile
|
||||
# Switchboard Core - Frontend Dockerfile
|
||||
# ==========================================
|
||||
# Static SPA served by nginx. In k8s, the
|
||||
# Ingress routes /api/ and /ws to the backend
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: chat-switchboard
|
||||
container_name: switchboard-core
|
||||
environment:
|
||||
PORT: "8080"
|
||||
BASE_PATH: ""
|
||||
|
||||
@@ -18,7 +18,7 @@ DB_MAX_CONNS=25
|
||||
# ── Auth ─────────────────────────────────────
|
||||
JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
||||
JWT_EXPIRATION=24h
|
||||
JWT_ISSUER=chat-switchboard
|
||||
JWT_ISSUER=switchboard-core
|
||||
|
||||
# ── Bootstrap Admin ──────────────────────────
|
||||
# Creates or updates admin account on every startup.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ==========================================
|
||||
# Chat Switchboard - Backend Dockerfile
|
||||
# Switchboard Core - Backend Dockerfile
|
||||
# ==========================================
|
||||
# Standalone Go API server for cluster deployment.
|
||||
# Build context is the repo root (not ./server).
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
type Mode string
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
const bcryptCost = 12
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// MTLSConfig holds mTLS-specific configuration.
|
||||
|
||||
@@ -3,7 +3,7 @@ package auth
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
func TestParseDN(t *testing.T) {
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// OIDCConfig holds OIDC-specific configuration from env vars.
|
||||
|
||||
@@ -3,7 +3,7 @@ package auth_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"switchboard-core/auth"
|
||||
)
|
||||
|
||||
func TestOIDCProvider_Discovery(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// EveryoneGroupID is the stable ID of the implicit "Everyone" group seeded in
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
const sessionCookieName = "sb_session"
|
||||
|
||||
@@ -3,7 +3,7 @@ package capabilities
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
func TestLookupKnownModel_AlwaysFalse(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ── Known Model Defaults ────────────────────
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ModelsForUser returns all models and Personas visible to a user.
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/roles"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/roles"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ── Request / Result ────────────────────────
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
)
|
||||
|
||||
// ── Helpers ─────────────────────────────────
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package compaction
|
||||
|
||||
import (
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ── Token Estimation ────────────────────────
|
||||
|
||||
@@ -3,7 +3,7 @@ package compaction
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
func TestEstimateTokens(t *testing.T) {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/roles"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/roles"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ── Defaults ────────────────────────────────
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"switchboard-core/database"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
_ "github.com/lib/pq"
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"switchboard-core/config"
|
||||
)
|
||||
|
||||
// DB is the application-wide database connection pool.
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// Use SetupTestDB in TestMain and pass this to subtests.
|
||||
var TestDB *sql.DB
|
||||
|
||||
const testDBName = "chat_switchboard_ci"
|
||||
const testDBName = "switchboard_core_ci"
|
||||
|
||||
// SetupTestDB connects to the appropriate database backend (Postgres or
|
||||
// SQLite based on DB_DRIVER env), runs migrations, and sets database.DB
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
"github.com/lib/pq"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"switchboard-core/database"
|
||||
)
|
||||
|
||||
const pgNotifyChannel = "switchboard_events"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// TicketValidatorAdapter satisfies middleware.TicketValidator using a
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"chat-switchboard/metrics"
|
||||
"switchboard-core/metrics"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── ChatGPT format types ─────────────────────
|
||||
|
||||
@@ -7,7 +7,7 @@ package export
|
||||
// Sanitize* function returns a clean map ready for JSON marshalling.
|
||||
|
||||
import (
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ── User ─────────────────────────────────────
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// DiscoverStarlarkFilters scans the package registry for active starlark
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// KBInjectFilter injects a system prompt listing active knowledge bases
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
|
||||
"go.starlark.net/starlark"
|
||||
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// StarlarkFilter runs a Starlark package's on_pre_completion entry point.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module chat-switchboard
|
||||
module switchboard-core
|
||||
|
||||
go 1.23.0
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/tools/search"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/tools/search"
|
||||
)
|
||||
|
||||
type AdminHandler struct {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ListGlobalConnections returns all global-scope connections.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/notifications"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// AdminEmailHandler handles admin SMTP configuration and test endpoints.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ProviderConfigHandler handles user-facing provider config endpoints.
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// AuditLog writes an audit entry via the store interface.
|
||||
|
||||
@@ -17,11 +17,11 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// Claims represents the JWT payload.
|
||||
|
||||
@@ -14,9 +14,9 @@ import (
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
func testConfig() *config.Config {
|
||||
@@ -44,7 +44,7 @@ func TestJWTGeneration(t *testing.T) {
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(now),
|
||||
ExpiresAt: jwt.NewNumericDate(now.Add(15 * time.Minute)),
|
||||
Issuer: "chat-switchboard",
|
||||
Issuer: "switchboard-core",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
const avatarSize = 128
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/health"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
capspkg "switchboard-core/capabilities"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/health"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ModelHandler provides the unified models endpoint.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Channel Models Handler ──────────────────
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Request / Response types ────────────────
|
||||
|
||||
@@ -14,23 +14,23 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/filters"
|
||||
"chat-switchboard/health"
|
||||
"chat-switchboard/knowledge"
|
||||
"chat-switchboard/metrics"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/routing"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/tools"
|
||||
"switchboard-core/auth"
|
||||
capspkg "switchboard-core/capabilities"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/filters"
|
||||
"switchboard-core/health"
|
||||
"switchboard-core/knowledge"
|
||||
"switchboard-core/metrics"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/notifications"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/routing"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/tools"
|
||||
)
|
||||
|
||||
// ── Request Types ───────────────────────────
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
capspkg "switchboard-core/capabilities"
|
||||
)
|
||||
|
||||
// maxChainDepth limits AI-to-AI chaining to prevent runaway loops.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ConnectionResolverAdapter implements sandbox.ConnectionResolver.
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ConnectionTypeEntry is a single connection type in the API response.
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ConnectionHandler handles user-facing extension connection endpoints.
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/health"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/health"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Dashboard Admin Handler ─────────────────
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ── Extension Dependencies (v0.38.2) ──────────────────
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/export"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/export"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// DataExportHandler serves data export endpoints.
|
||||
|
||||
@@ -42,9 +42,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.starlark.net/starlark"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ExtAPIHandler serves extension API routes via Starlark.
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// validSchemaIdentifier matches safe SQL identifiers for table and column names.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── mock ExtDataStore ────────────────────────────────────────────────────────
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ExtPermHandler serves extension permission management endpoints.
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ExtSecretsHandler serves extension secret management endpoints.
|
||||
|
||||
@@ -11,13 +11,13 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
authpkg "chat-switchboard/auth"
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
authpkg "switchboard-core/auth"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Extension Test Harness ──────────────────
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ExtensionHandler serves extension management endpoints.
|
||||
|
||||
@@ -13,11 +13,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/extraction"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/workspace"
|
||||
"switchboard-core/extraction"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/workspace"
|
||||
)
|
||||
|
||||
// ── Default Limits ─────────────────────────
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
type FolderHandler struct {
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// GDPRHandler serves account deletion endpoints.
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/workspace"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/workspace"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Git Credentials Test Harness ──────────
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/notifications"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Request types ───────────────────────────
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
"chat-switchboard/health"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/store"
|
||||
capspkg "switchboard-core/capabilities"
|
||||
"switchboard-core/health"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Health Admin Handler ────────────────────
|
||||
|
||||
@@ -17,10 +17,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/export"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/export"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// DataImportHandler serves data import endpoints.
|
||||
|
||||
@@ -15,16 +15,16 @@ import (
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"chat-switchboard/config"
|
||||
authpkg "chat-switchboard/auth"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/roles"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/config"
|
||||
authpkg "switchboard-core/auth"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/roles"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ── Test Harness ────────────────────────────
|
||||
@@ -477,7 +477,7 @@ func makeToken(userID, email, role string) string {
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
IssuedAt: jwt.NewNumericDate(time.Now()),
|
||||
ExpiresAt: jwt.NewNumericDate(time.Now().Add(1 * time.Hour)),
|
||||
Issuer: "chat-switchboard",
|
||||
Issuer: "switchboard-core",
|
||||
},
|
||||
}
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/knowledge"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/knowledge"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Limits ───────────────────────────────────
|
||||
|
||||
@@ -7,14 +7,14 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/compaction"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/roles"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"chat-switchboard/treepath"
|
||||
"switchboard-core/compaction"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/roles"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ═══════════════════════════════════════════
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/providers"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/providers"
|
||||
)
|
||||
|
||||
// ═══════════════════════════════════════════
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/memory"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/memory"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// MemoryHandler provides REST endpoints for memory management.
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"chat-switchboard/knowledge"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/knowledge"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// maxMemoryChars is the approximate character budget for injected memories.
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// seedMemory inserts a memory directly into the DB for testing.
|
||||
|
||||
@@ -12,16 +12,16 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/tools"
|
||||
"chat-switchboard/treepath"
|
||||
capspkg "switchboard-core/capabilities"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/storage"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/tools"
|
||||
"switchboard-core/treepath"
|
||||
)
|
||||
|
||||
// ── Request / Response types ────────────────
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ModelPrefsHandler handles user model preference endpoints.
|
||||
|
||||
@@ -8,12 +8,12 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Model Prefs Test Harness ──────────────
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// providerSyncTimeout is the maximum time allowed for an outbound provider
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notelinks"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/notelinks"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Request / Response Types ────────────────
|
||||
|
||||
@@ -8,14 +8,14 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/notifications"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Notification Test Harness ──────────────
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/notifications"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Handler ─────────────────────────────────
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// PackageExportHandler handles package export operations.
|
||||
|
||||
@@ -28,8 +28,8 @@ import (
|
||||
|
||||
"go.starlark.net/starlark"
|
||||
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ParseSchemaVersion extracts the "schema_version" integer from a manifest.
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// RegistryEntry represents a single package in the registry.
|
||||
|
||||
@@ -15,10 +15,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.starlark.net/starlark"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// validPackageID matches lowercase alphanumeric slugs with optional hyphens.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Channel Participants Handler ──────────────
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"chat-switchboard/database"
|
||||
"switchboard-core/database"
|
||||
)
|
||||
|
||||
// ── Helpers ─────────────────────────────────
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
type PersonaGroupHandler struct {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// PersonaHandler handles persona endpoints.
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
const presenceOnlineThreshold = 90 * time.Second
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ProfileBootstrapHandler serves the combined boot payload.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/auth"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ProfilePermissionsHandler exposes the current user's resolved permissions.
|
||||
|
||||
@@ -8,12 +8,12 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Profile Test Harness ──────────────────
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ── Request / Response Types ────────────────
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/config"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/middleware"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
postgres "chat-switchboard/store/postgres"
|
||||
sqlite "chat-switchboard/store/sqlite"
|
||||
"switchboard-core/config"
|
||||
"switchboard-core/database"
|
||||
"switchboard-core/middleware"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
postgres "switchboard-core/store/postgres"
|
||||
sqlite "switchboard-core/store/sqlite"
|
||||
)
|
||||
|
||||
// ── Project Test Harness ──────────────────
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/sandbox"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// ProviderResolverAdapter implements sandbox.ProviderResolver using
|
||||
|
||||
@@ -17,10 +17,10 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/tools"
|
||||
"switchboard-core/crypto"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/store"
|
||||
"switchboard-core/tools"
|
||||
)
|
||||
|
||||
// ── Provider Resolution ────────────────────────
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/roles"
|
||||
"chat-switchboard/store"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/providers"
|
||||
"switchboard-core/roles"
|
||||
"switchboard-core/store"
|
||||
)
|
||||
|
||||
// RolesHandler manages model role configuration.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user