@powerhousedao/switchboard 4.1.0-dev.2 → 4.1.0-dev.20

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/CHANGELOG.md CHANGED
@@ -1,3 +1,149 @@
1
+ ## 4.1.0-dev.20 (2025-08-15)
2
+
3
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
4
+
5
+ ## 4.1.0-dev.19 (2025-08-14)
6
+
7
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
8
+
9
+ ## 4.1.0-dev.18 (2025-08-14)
10
+
11
+ ### 🩹 Fixes
12
+
13
+ - overly aggressive linter fixes ([e074de3df](https://github.com/powerhouse-inc/powerhouse/commit/e074de3df))
14
+
15
+ ### ❤️ Thank You
16
+
17
+ - Benjamin Jordan (@thegoldenmule)
18
+
19
+ ## 4.1.0-dev.17 (2025-08-12)
20
+
21
+ ### 🚀 Features
22
+
23
+ - refactor vetra command and remove vetra deps in connect and reactor ([#1753](https://github.com/powerhouse-inc/powerhouse/pull/1753))
24
+
25
+ ### ❤️ Thank You
26
+
27
+ - Guillermo Puente Sandoval @gpuente
28
+
29
+ ## 4.1.0-dev.16 (2025-08-12)
30
+
31
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
32
+
33
+ ## 4.1.0-dev.15 (2025-08-12)
34
+
35
+ ### 🚀 Features
36
+
37
+ - **reactor-mcp,reactor-api,reactor-local,switchboard,ph-cli:** run mcp on express app ([d51fa590e](https://github.com/powerhouse-inc/powerhouse/commit/d51fa590e))
38
+
39
+ ### ❤️ Thank You
40
+
41
+ - acaldas @acaldas
42
+
43
+ ## 4.1.0-dev.14 (2025-08-11)
44
+
45
+ ### 🚀 Features
46
+
47
+ - update document engineering dep ([54dcee90d](https://github.com/powerhouse-inc/powerhouse/commit/54dcee90d))
48
+
49
+ ### ❤️ Thank You
50
+
51
+ - acaldas @acaldas
52
+
53
+ ## 4.1.0-dev.13 (2025-08-09)
54
+
55
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
56
+
57
+ ## 4.1.0-dev.12 (2025-08-08)
58
+
59
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
60
+
61
+ ## 4.1.0-dev.11 (2025-08-07)
62
+
63
+ ### 🚀 Features
64
+
65
+ - **switchboard:** added dev mode to switchboard where local document models are loaded ([449e730b6](https://github.com/powerhouse-inc/powerhouse/commit/449e730b6))
66
+ - **switchboard,reactor-local,reactor-api:** moved vite loader to reactor-api package ([c84f0a2a3](https://github.com/powerhouse-inc/powerhouse/commit/c84f0a2a3))
67
+ - vetra package documents and app integration ([0e4053302](https://github.com/powerhouse-inc/powerhouse/commit/0e4053302))
68
+ - **vetra:** added vetra drive editor ([4ebafd143](https://github.com/powerhouse-inc/powerhouse/commit/4ebafd143))
69
+ - integrate package documents into reactor system ([939fe8e80](https://github.com/powerhouse-inc/powerhouse/commit/939fe8e80))
70
+ - **connect:** integrate Vetra package documents and editors ([2ecb9bd15](https://github.com/powerhouse-inc/powerhouse/commit/2ecb9bd15))
71
+
72
+ ### ❤️ Thank You
73
+
74
+ - acaldas @acaldas
75
+ - Guillermo Puente @gpuente
76
+ - Guillermo Puente Sandoval @gpuente
77
+
78
+ ## 4.1.0-dev.10 (2025-08-07)
79
+
80
+ ### 🚀 Features
81
+
82
+ - **builder-tools,codegen,design-system,reactor-api:** updated document-engineering version ([e74068b43](https://github.com/powerhouse-inc/powerhouse/commit/e74068b43))
83
+
84
+ ### ❤️ Thank You
85
+
86
+ - acaldas @acaldas
87
+
88
+ ## 4.1.0-dev.9 (2025-08-07)
89
+
90
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
91
+
92
+ ## 4.1.0-dev.8 (2025-08-06)
93
+
94
+ ### 🚀 Features
95
+
96
+ - **switchboard,config,reactor-api:** handle auth in reactor-api ([f33c921ee](https://github.com/powerhouse-inc/powerhouse/commit/f33c921ee))
97
+
98
+ ### ❤️ Thank You
99
+
100
+ - acaldas @acaldas
101
+
102
+ ## 4.1.0-dev.7 (2025-08-06)
103
+
104
+ ### 🚀 Features
105
+
106
+ - **switchboard:** added readme ([fbadfca11](https://github.com/powerhouse-inc/powerhouse/commit/fbadfca11))
107
+
108
+ ### ❤️ Thank You
109
+
110
+ - Frank
111
+
112
+ ## 4.1.0-dev.6 (2025-08-06)
113
+
114
+ ### 🚀 Features
115
+
116
+ - **reactor-mcp:** load local document models and reload when they change ([0408a017c](https://github.com/powerhouse-inc/powerhouse/commit/0408a017c))
117
+ - **reactor-local,reactor-api,document-drive:** reload local document models when they change ([5d9af3951](https://github.com/powerhouse-inc/powerhouse/commit/5d9af3951))
118
+
119
+ ### ❤️ Thank You
120
+
121
+ - acaldas @acaldas
122
+
123
+ ## 4.1.0-dev.5 (2025-08-05)
124
+
125
+ This was a version bump only for @powerhousedao/switchboard to align it with other projects, there were no code changes.
126
+
127
+ ## 4.1.0-dev.4 (2025-08-02)
128
+
129
+ ### 🚀 Features
130
+
131
+ - ts morph integration ([#1729](https://github.com/powerhouse-inc/powerhouse/pull/1729))
132
+
133
+ ### ❤️ Thank You
134
+
135
+ - Guillermo Puente Sandoval @gpuente
136
+
137
+ ## 4.1.0-dev.3 (2025-08-01)
138
+
139
+ ### 🚀 Features
140
+
141
+ - **reactor-mcp:** setup of modular reactor tools ([ceab98b08](https://github.com/powerhouse-inc/powerhouse/commit/ceab98b08))
142
+
143
+ ### ❤️ Thank You
144
+
145
+ - acaldas @acaldas
146
+
1
147
  ## 4.1.0-dev.2 (2025-07-31)
2
148
 
3
149
  ### 🚀 Features
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # Switchboard
2
+
3
+ A powerful document-driven server that provides a unified API for managing and serving document models, drives, and reactors in the Powerhouse ecosystem.
4
+
5
+ ## 🚀 Features
6
+
7
+ - **Document Model Management**: Serve and manage document models with GraphQL API
8
+ - **Document Drive Support**: Handle document drives with filesystem and PostgreSQL storage
9
+ - **Reactor Integration**: Built-in support for Powerhouse reactors
10
+ - **Flexible Storage**: Support for filesystem, PostgreSQL, and Redis caching
11
+ - **Docker Ready**: Containerized deployment with comprehensive environment configuration
12
+ - **Authentication**: Configurable authentication with guest, user, and admin roles
13
+ - **HTTPS Support**: Built-in HTTPS server with custom certificates
14
+ - **Profiling**: Integration with Pyroscope for performance monitoring
15
+ - **Error Tracking**: Sentry integration for error monitoring and reporting
16
+
17
+ ## 📦 Installation
18
+
19
+ ### Prerequisites
20
+
21
+ - Node.js 22+
22
+ - pnpm (recommended) or npm
23
+ - Redis (optional, for caching)
24
+ - PostgreSQL (optional, for persistent storage)
25
+
26
+ ### Local Development
27
+
28
+ ```bash
29
+ # Clone the repository
30
+ git clone https://github.com/powerhouse-inc/powerhouse.git
31
+ cd powerhouse
32
+
33
+ # Install dependencies
34
+ pnpm install
35
+
36
+ # Build the switchboard
37
+ pnpm --filter @powerhousedao/switchboard build
38
+
39
+ # Start in development mode
40
+ pnpm --filter @powerhousedao/switchboard dev
41
+ ```
42
+
43
+ ### Global Installation
44
+
45
+ ```bash
46
+ # Install globally
47
+ npm install -g @powerhousedao/switchboard
48
+
49
+ # Or using pnpm
50
+ pnpm add -g @powerhousedao/switchboard
51
+ ```
52
+
53
+ ## 🏃‍♂️ Quick Start
54
+
55
+ ## ⚙️ Configuration
56
+
57
+ ### Environment Variables
58
+
59
+ | Variable | Description | Default |
60
+ |----------|-------------|---------|
61
+ | `PORT` | Server port | `4001` |
62
+ | `DATABASE_URL` | Database connection string | `./.ph/drive-storage` |
63
+ | `REDIS_URL` | Redis connection URL | - |
64
+ | `REDIS_TLS_URL` | Redis TLS connection URL | - |
65
+ | `SENTRY_DSN` | Sentry DSN for error tracking | - |
66
+ | `SENTRY_ENV` | Sentry environment | - |
67
+ | `PYROSCOPE_SERVER_ADDRESS` | Pyroscope server address | - |
68
+
69
+ ### Authentication Configuration
70
+
71
+ ```typescript
72
+ const options = {
73
+ auth: {
74
+ enabled: true,
75
+ guests: ['0x123', '0x456'],
76
+ users: ['0x789', '0xabc'],
77
+ admins: ['0xdef', '0xghi']
78
+ }
79
+ };
80
+ ```
81
+
82
+ ### Storage Options
83
+
84
+ Switchboard supports multiple storage backends:
85
+
86
+ - **Filesystem**: Local file-based storage (default)
87
+ - **PostgreSQL**: Persistent database storage
88
+ - **Redis**: Caching layer (optional)
89
+
90
+ ## 🐳 Docker Deployment
91
+
92
+ ### Using Docker Compose
93
+
94
+ ```yaml
95
+ version: '3.8'
96
+ services:
97
+ switchboard:
98
+ image: powerhouse/switchboard:latest
99
+ ports:
100
+ - "4001:4001"
101
+ environment:
102
+ - PORT=4001
103
+ - DATABASE_URL=postgresql://user:pass@db:5432/switchboard
104
+ - REDIS_URL=redis://redis:6379
105
+ depends_on:
106
+ - db
107
+ - redis
108
+
109
+ db:
110
+ image: postgres:15
111
+ environment:
112
+ POSTGRES_DB: switchboard
113
+ POSTGRES_USER: user
114
+ POSTGRES_PASSWORD: pass
115
+
116
+ redis:
117
+ image: redis:7-alpine
118
+ ```
119
+
120
+ ### Environment Variables for Docker
121
+
122
+ ```bash
123
+ # Database
124
+ PH_SWITCHBOARD_DATABASE_URL="postgresql://user:pass@db:5432/switchboard"
125
+ PH_SWITCHBOARD_REDIS_URL="redis://redis:6379"
126
+
127
+ # Authentication
128
+ PH_SWITCHBOARD_AUTH_ENABLED=true
129
+ PH_SWITCHBOARD_ADMINS_LIST="0x123,0x456"
130
+ PH_SWITCHBOARD_USERS_LIST="0x789,0xabc"
131
+ PH_SWITCHBOARD_GUESTS_LIST="0xdef,0xghi"
132
+
133
+ # Packages
134
+ PH_PACKAGES="package1,package2,package3"
135
+ ```
136
+
137
+ ## 🔧 Development
138
+
139
+ ### Project Structure
140
+
141
+ ```
142
+ src/
143
+ ├── index.ts # Main entry point
144
+ ├── server.ts # Server implementation
145
+ ├── config.ts # Configuration management
146
+ ├── types.ts # TypeScript type definitions
147
+ ├── utils.ts # Utility functions
148
+ ├── profiler.ts # Profiling integration
149
+ ├── install-packages.ts # Package installation
150
+ └── clients/ # External client integrations
151
+ └── redis.ts # Redis client
152
+ ```
153
+
154
+ ### Available Scripts
155
+
156
+ ```bash
157
+ # Build the project
158
+ pnpm build
159
+
160
+ # Start in development mode
161
+ pnpm dev
162
+
163
+ # Start production server
164
+ pnpm start
165
+
166
+ # Lint code
167
+ pnpm lint
168
+
169
+ # Clean build artifacts
170
+ pnpm clean
171
+ ```
172
+
173
+ ### Adding New Features
174
+
175
+ 1. **Document Models**: Add new document model modules to the reactor builder
176
+ 2. **Storage Backends**: Implement new storage adapters
177
+ 3. **Authentication**: Extend authentication logic
178
+ 4. **API Endpoints**: Add new GraphQL resolvers
179
+
180
+ ## 📚 API Reference
181
+
182
+ ### GraphQL Endpoints
183
+
184
+ Switchboard exposes a GraphQL API for document operations:
185
+
186
+ - **Document Models**: Query and mutate document models
187
+ - **Document Drives**: Manage document drives
188
+ - **Reactor Operations**: Execute reactor operations
189
+
190
+ ### REST Endpoints
191
+
192
+ - `GET /health` - Health check endpoint
193
+ - `POST /graphql` - GraphQL endpoint
194
+ - `GET /graphql` - GraphQL playground (development)
195
+
196
+ ## 🤝 Contributing
197
+
198
+ 1. Fork the repository
199
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
200
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
201
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
202
+ 5. Open a Pull Request
203
+
204
+ ## 📄 License
205
+
206
+ This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
207
+
208
+ ## 🆘 Support
209
+
210
+ - **Documentation**: [Powerhouse Docs](https://docs.powerhouse.com)
211
+ - **Issues**: [GitHub Issues](https://github.com/powerhouse-inc/powerhouse/issues)
212
+ - **Discussions**: [GitHub Discussions](https://github.com/powerhouse-inc/powerhouse/discussions)
213
+
214
+ ## 🔗 Related Projects
215
+
216
+ - [@powerhousedao/reactor-api](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/reactor-api) - Reactor API package
217
+ - [@powerhousedao/document-drive](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-drive) - Document drive management
218
+ - [@powerhousedao/document-model](https://github.com/powerhouse-inc/powerhouse/tree/main/packages/document-model) - Document model system
@@ -3,6 +3,7 @@ interface Config {
3
3
  url: string;
4
4
  };
5
5
  port: number;
6
+ mcp: boolean;
6
7
  }
7
8
  export declare const config: Config;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,MAapB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,UAAU,MAAM;IACd,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;CACd;AACD,eAAO,MAAM,MAAM,EAAE,MAcpB,CAAC"}
@@ -14,5 +14,6 @@ export const config = {
14
14
  !isNaN(Number(process.env.PH_SWITCHBOARD_PORT))
15
15
  ? Number(process.env.PH_SWITCHBOARD_PORT)
16
16
  : (switchboard?.port ?? 4001),
17
+ mcp: true,
17
18
  };
18
19
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;AAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;AAOjC,MAAM,C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ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAoB9E,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAiF5B,CAAC;AAEF,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AA0BA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAyI9E,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAmB5B,CAAC;AAEF,cAAc,YAAY,CAAC"}
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { startAPI } from "@powerhousedao/reactor-api";
3
+ import { VitePackageLoader, startViteServer, } from "@powerhousedao/reactor-api/packages/vite-loader";
3
4
  import * as Sentry from "@sentry/node";
4
5
  import { InMemoryCache, ReactorBuilder, driveDocumentModelModule, } from "document-drive";
6
+ import { DocumentAlreadyExistsError } from "document-drive/server/error";
5
7
  import RedisCache from "document-drive/cache/redis";
6
8
  import { FilesystemStorage } from "document-drive/storage/filesystem";
7
9
  import { PrismaStorageFactory } from "document-drive/storage/prisma";
@@ -24,6 +26,106 @@ if (process.env.SENTRY_DSN) {
24
26
  Sentry.setupExpressErrorHandler(app);
25
27
  }
26
28
  const DEFAULT_PORT = process.env.PORT ? Number(process.env.PORT) : 4001;
29
+ async function initServer(serverPort, options) {
30
+ const { dev, packages = [], remoteDrives = [] } = options;
31
+ // start redis if configured
32
+ const redisUrl = process.env.REDIS_TLS_URL ?? process.env.REDIS_URL;
33
+ let redis;
34
+ if (redisUrl) {
35
+ try {
36
+ redis = await initRedis(redisUrl);
37
+ }
38
+ catch (e) {
39
+ console.error(e);
40
+ }
41
+ }
42
+ const connectionString = process.env.DATABASE_URL ?? "./.ph/drive-storage";
43
+ const dbUrl = connectionString.includes("amazonaws") &&
44
+ !connectionString.includes("sslmode=no-verify")
45
+ ? connectionString + "?sslmode=no-verify"
46
+ : connectionString;
47
+ const cache = redis ? new RedisCache(redis) : new InMemoryCache();
48
+ const storageFactory = dbUrl.startsWith("postgresql")
49
+ ? new PrismaStorageFactory(dbUrl, cache)
50
+ : undefined;
51
+ const storage = storageFactory
52
+ ? storageFactory.build()
53
+ : new FilesystemStorage(path.join(process.cwd(), dbUrl));
54
+ const reactor = new ReactorBuilder([
55
+ documentModelDocumentModelModule,
56
+ driveDocumentModelModule,
57
+ ])
58
+ .withStorage(storage)
59
+ .withCache(cache)
60
+ .build();
61
+ // init drive server
62
+ await reactor.initialize();
63
+ const dbPath = dbUrl.startsWith("postgresql") ? dbUrl : ".ph/read-storage";
64
+ let defaultDriveUrl = undefined;
65
+ // Create default drive if provided
66
+ if (options.drive) {
67
+ defaultDriveUrl = await addDefaultDrive(reactor, options.drive, serverPort);
68
+ }
69
+ // start vite server if dev mode is enabled
70
+ const vite = dev ? await startViteServer() : undefined;
71
+ // get paths to local document models
72
+ if (dev) {
73
+ // TODO get path from powerhouse config
74
+ const basePath = process.cwd();
75
+ packages.push(basePath);
76
+ }
77
+ // create loader
78
+ const packageLoader = vite ? await VitePackageLoader.build(vite) : undefined;
79
+ // Start the API with the reactor and options
80
+ const api = await startAPI(reactor, {
81
+ express: app,
82
+ port: serverPort,
83
+ dbPath: options.dbPath ?? dbPath,
84
+ https: options.https,
85
+ packageLoader,
86
+ packages: options.packages,
87
+ configFile: options.configFile ?? path.join(process.cwd(), "powerhouse.config.json"),
88
+ mcp: options.mcp ?? true,
89
+ });
90
+ // add vite middleware after express app is initialized if applicable
91
+ if (vite) {
92
+ api.app.use(vite.middlewares);
93
+ }
94
+ // Connect to remote drives AFTER packages are loaded
95
+ if (remoteDrives.length > 0) {
96
+ for (const remoteDriveUrl of remoteDrives) {
97
+ try {
98
+ await reactor.addRemoteDrive(remoteDriveUrl, {
99
+ availableOffline: true,
100
+ sharingType: "public",
101
+ listeners: [],
102
+ triggers: [],
103
+ });
104
+ // Use the first remote drive URL as the default
105
+ if (!defaultDriveUrl) {
106
+ defaultDriveUrl = remoteDriveUrl;
107
+ }
108
+ }
109
+ catch (error) {
110
+ if (error instanceof DocumentAlreadyExistsError) {
111
+ console.info(`Remote drive already added: ${remoteDriveUrl}`);
112
+ // Still use this drive URL as default if not already set
113
+ if (!defaultDriveUrl) {
114
+ defaultDriveUrl = remoteDriveUrl;
115
+ }
116
+ }
117
+ else {
118
+ console.error(`Failed to connect to remote drive ${remoteDriveUrl}:`, error);
119
+ }
120
+ }
121
+ }
122
+ }
123
+ return {
124
+ defaultDriveUrl,
125
+ api,
126
+ reactor,
127
+ };
128
+ }
27
129
  export const startSwitchboard = async (options = {}) => {
28
130
  const serverPort = options.port ?? DEFAULT_PORT;
29
131
  if (process.env.PYROSCOPE_SERVER_ADDRESS) {
@@ -36,56 +138,7 @@ export const startSwitchboard = async (options = {}) => {
36
138
  }
37
139
  }
38
140
  try {
39
- const redisUrl = process.env.REDIS_TLS_URL ?? process.env.REDIS_URL;
40
- let redis;
41
- if (redisUrl) {
42
- try {
43
- redis = await initRedis(redisUrl);
44
- }
45
- catch (e) {
46
- console.error(e);
47
- }
48
- }
49
- const connectionString = process.env.DATABASE_URL ?? "./.ph/drive-storage";
50
- const dbUrl = connectionString.includes("amazonaws") &&
51
- !connectionString.includes("sslmode=no-verify")
52
- ? connectionString + "?sslmode=no-verify"
53
- : connectionString;
54
- const cache = redis ? new RedisCache(redis) : new InMemoryCache();
55
- const storageFactory = dbUrl.startsWith("postgresql")
56
- ? new PrismaStorageFactory(dbUrl, cache)
57
- : undefined;
58
- const storage = storageFactory
59
- ? storageFactory.build()
60
- : new FilesystemStorage(path.join(process.cwd(), dbUrl));
61
- const reactor = new ReactorBuilder([
62
- documentModelDocumentModelModule,
63
- driveDocumentModelModule,
64
- ])
65
- .withStorage(storage)
66
- .withCache(cache)
67
- .build();
68
- // init drive server
69
- await reactor.initialize();
70
- const dbPath = dbUrl.startsWith("postgresql") ? dbUrl : ".ph/read-storage";
71
- let defaultDriveUrl = undefined;
72
- if (options.drive) {
73
- defaultDriveUrl = await addDefaultDrive(reactor, options.drive, serverPort);
74
- }
75
- // Start the API with the reactor and options
76
- await startAPI(reactor, {
77
- express: app,
78
- port: serverPort,
79
- dbPath: options.dbPath ?? dbPath,
80
- https: options.https,
81
- packages: options.packages,
82
- configFile: options.configFile ??
83
- path.join(process.cwd(), "powerhouse.config.json"),
84
- });
85
- return {
86
- defaultDriveUrl,
87
- reactor,
88
- };
141
+ return await initServer(serverPort, options);
89
142
  }
90
143
  catch (e) {
91
144
  Sentry.captureException(e);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EACL,aAAa,EACb,cAAc,EACd,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAEL,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,kDAAkD;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AAK,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC,CAAC;AAEF,cAAc,YAAY,CAAC"}
@@ -7,9 +7,11 @@ export type StorageOptions = {
7
7
  export type StartServerOptions = {
8
8
  configFile?: string;
9
9
  port?: number;
10
+ dev?: boolean;
10
11
  dbPath?: string;
11
12
  drive?: DriveInput;
12
13
  packages?: string[];
14
+ remoteDrives?: string[];
13
15
  https?: {
14
16
  keyPath: string;
15
17
  certPath: string;
@@ -20,6 +22,7 @@ export type StartServerOptions = {
20
22
  users: string[];
21
23
  admins: string[];
22
24
  };
25
+ mcp?: boolean;
23
26
  };
24
27
  export type SwitchboardReactor = {
25
28
  defaultDriveUrl: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EA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