@solidactions/sdk 0.1.0 → 0.2.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 (115) hide show
  1. package/README.md +28 -4
  2. package/dist/src/adminserver.d.ts +0 -2
  3. package/dist/src/adminserver.d.ts.map +1 -1
  4. package/dist/src/adminserver.js +17 -7
  5. package/dist/src/adminserver.js.map +1 -1
  6. package/dist/src/authdecorators.js +1 -2
  7. package/dist/src/authdecorators.js.map +1 -1
  8. package/dist/src/cli/cli.js +0 -0
  9. package/dist/src/conductor/conductor.d.ts +0 -1
  10. package/dist/src/conductor/conductor.d.ts.map +1 -1
  11. package/dist/src/conductor/conductor.js +17 -7
  12. package/dist/src/conductor/conductor.js.map +1 -1
  13. package/dist/src/config.js +11 -11
  14. package/dist/src/config.js.map +1 -1
  15. package/dist/src/context.d.ts +0 -2
  16. package/dist/src/context.d.ts.map +1 -1
  17. package/dist/src/context.js +8 -9
  18. package/dist/src/context.js.map +1 -1
  19. package/dist/src/database_utils.js +3 -4
  20. package/dist/src/database_utils.js.map +1 -1
  21. package/dist/src/debugpoint.js +5 -5
  22. package/dist/src/debugpoint.js.map +1 -1
  23. package/dist/src/decorators.d.ts.map +1 -1
  24. package/dist/src/decorators.js +35 -35
  25. package/dist/src/decorators.js.map +1 -1
  26. package/dist/src/error.d.ts +2 -2
  27. package/dist/src/error.d.ts.map +1 -1
  28. package/dist/src/error.js +3 -3
  29. package/dist/src/error.js.map +1 -1
  30. package/dist/src/http_client.d.ts +7 -1
  31. package/dist/src/http_client.d.ts.map +1 -1
  32. package/dist/src/http_client.js +17 -6
  33. package/dist/src/http_client.js.map +1 -1
  34. package/dist/src/http_system_database.d.ts +1 -0
  35. package/dist/src/http_system_database.d.ts.map +1 -1
  36. package/dist/src/http_system_database.js +11 -1
  37. package/dist/src/http_system_database.js.map +1 -1
  38. package/dist/src/index.js +17 -7
  39. package/dist/src/index.js.map +1 -1
  40. package/dist/src/serialization.d.ts.map +1 -1
  41. package/dist/src/serialization.js +7 -7
  42. package/dist/src/serialization.js.map +1 -1
  43. package/dist/src/solidactions-executor.js +17 -7
  44. package/dist/src/solidactions-executor.js.map +1 -1
  45. package/dist/src/solidactions.d.ts +23 -3
  46. package/dist/src/solidactions.d.ts.map +1 -1
  47. package/dist/src/solidactions.js +30 -4
  48. package/dist/src/solidactions.js.map +1 -1
  49. package/dist/src/system_database.d.ts +1 -0
  50. package/dist/src/system_database.d.ts.map +1 -1
  51. package/dist/src/system_database.js.map +1 -1
  52. package/dist/src/telemetry/collector.d.ts.map +1 -1
  53. package/dist/src/telemetry/logs.d.ts.map +1 -1
  54. package/dist/src/telemetry/traces.js +5 -5
  55. package/dist/src/telemetry/traces.js.map +1 -1
  56. package/dist/src/testing/index.d.ts +13 -0
  57. package/dist/src/testing/index.d.ts.map +1 -0
  58. package/dist/src/testing/index.js +19 -0
  59. package/dist/src/testing/index.js.map +1 -0
  60. package/dist/src/testing/mock_server.d.ts +134 -0
  61. package/dist/src/testing/mock_server.d.ts.map +1 -0
  62. package/dist/src/testing/mock_server.js +613 -0
  63. package/dist/src/testing/mock_server.js.map +1 -0
  64. package/dist/src/utils.d.ts +0 -1
  65. package/dist/src/utils.d.ts.map +1 -1
  66. package/dist/src/utils.js +8 -8
  67. package/dist/src/utils.js.map +1 -1
  68. package/dist/src/workflow.d.ts +1 -1
  69. package/dist/src/workflow.d.ts.map +1 -1
  70. package/dist/src/workflow.js +2 -2
  71. package/dist/src/workflow.js.map +1 -1
  72. package/dist/src/workflow_management.js +7 -8
  73. package/dist/src/workflow_management.js.map +1 -1
  74. package/dist/tsconfig.tsbuildinfo +1 -1
  75. package/docs/sdk-reference.md +1207 -0
  76. package/package.json +6 -1
  77. package/.claude/settings.local.json +0 -7
  78. package/dist/dbos-config.schema.json +0 -132
  79. package/dist/src/cli/commands.d.ts +0 -3
  80. package/dist/src/cli/commands.d.ts.map +0 -1
  81. package/dist/src/cli/commands.js +0 -46
  82. package/dist/src/cli/commands.js.map +0 -1
  83. package/dist/src/datasource.d.ts +0 -109
  84. package/dist/src/datasource.d.ts.map +0 -1
  85. package/dist/src/datasource.js +0 -204
  86. package/dist/src/datasource.js.map +0 -1
  87. package/dist/src/dbos-executor.d.ts +0 -189
  88. package/dist/src/dbos-executor.d.ts.map +0 -1
  89. package/dist/src/dbos-executor.js +0 -817
  90. package/dist/src/dbos-executor.js.map +0 -1
  91. package/dist/src/dbos.d.ts +0 -519
  92. package/dist/src/dbos.d.ts.map +0 -1
  93. package/dist/src/dbos.js +0 -1282
  94. package/dist/src/dbos.js.map +0 -1
  95. package/dist/src/debouncer.d.ts +0 -33
  96. package/dist/src/debouncer.d.ts.map +0 -1
  97. package/dist/src/debouncer.js +0 -170
  98. package/dist/src/debouncer.js.map +0 -1
  99. package/dist/src/scheduler/crontab.d.ts +0 -14
  100. package/dist/src/scheduler/crontab.d.ts.map +0 -1
  101. package/dist/src/scheduler/crontab.js +0 -308
  102. package/dist/src/scheduler/crontab.js.map +0 -1
  103. package/dist/src/scheduler/scheduler.d.ts +0 -41
  104. package/dist/src/scheduler/scheduler.d.ts.map +0 -1
  105. package/dist/src/scheduler/scheduler.js +0 -165
  106. package/dist/src/scheduler/scheduler.js.map +0 -1
  107. package/dist/src/wfqueue.d.ts +0 -64
  108. package/dist/src/wfqueue.d.ts.map +0 -1
  109. package/dist/src/wfqueue.js +0 -147
  110. package/dist/src/wfqueue.js.map +0 -1
  111. package/docs/api-schema.md +0 -1441
  112. package/docs/migration-guide.md +0 -460
  113. package/docs/phase-14-changes.md +0 -156
  114. package/docs/solidsteps-ai-prompt.md +0 -534
  115. package/solidactions-ai-prompt.md +0 -1504
@@ -1,460 +0,0 @@
1
- # Migration Guide: DBOS SDK PostgreSQL to HTTP
2
-
3
- This guide covers migrating from the PostgreSQL-based DBOS SDK to the HTTP-based SDK.
4
-
5
- ## Overview
6
-
7
- The DBOS TypeScript SDK has been refactored to use HTTP API calls instead of direct PostgreSQL database access. This change:
8
-
9
- - **Removes** all PostgreSQL dependencies from the SDK
10
- - **Requires** an HTTP API backend (Laravel) to handle workflow state
11
- - **Simplifies** SDK deployment (no database credentials needed)
12
-
13
- ## Breaking Changes
14
-
15
- ### Configuration Changes
16
-
17
- **Before (PostgreSQL):**
18
-
19
- ```yaml
20
- # dbos-config.yaml
21
- name: my-app
22
- system_database: postgresql://user:pass@localhost:5432/myapp_dbos_sys
23
- ```
24
-
25
- ```typescript
26
- // Code
27
- DBOS.setConfig({
28
- name: 'my-app',
29
- systemDatabaseUrl: 'postgresql://user:pass@localhost:5432/myapp_dbos_sys',
30
- });
31
- ```
32
-
33
- **After (HTTP):**
34
-
35
- ```yaml
36
- # dbos-config.yaml
37
- name: my-app
38
- api:
39
- url: https://api.example.com
40
- key: your-api-key
41
- timeout: 30000 # Optional: ms (default: 30000)
42
- maxRetries: 3 # Optional (default: 3)
43
- ```
44
-
45
- ```typescript
46
- // Code
47
- DBOS.setConfig({
48
- name: 'my-app',
49
- httpConfig: {
50
- apiUrl: 'https://api.example.com',
51
- apiKey: 'your-api-key',
52
- timeout: 30000,
53
- maxRetries: 3,
54
- },
55
- });
56
- ```
57
-
58
- ### Environment Variables
59
-
60
- **Before:**
61
-
62
- ```bash
63
- PGHOST=localhost
64
- PGPORT=5432
65
- PGUSER=postgres
66
- PGPASSWORD=mypassword
67
- PGDATABASE=myapp_dbos_sys
68
- # or
69
- DATABASE_URL=postgresql://user:pass@localhost:5432/myapp_dbos_sys
70
- ```
71
-
72
- **After:**
73
-
74
- ```bash
75
- DBOS_API_URL=https://api.example.com
76
- DBOS_API_KEY=your-api-key
77
- ```
78
-
79
- ### Removed Exports
80
-
81
- The following exports have been removed from the SDK:
82
-
83
- ```typescript
84
- // These no longer exist:
85
- import { PostgresSystemDatabase } from '@dbos-inc/dbos-sdk'; // Removed
86
- import { Pool } from 'pg'; // No longer a dependency
87
-
88
- // Use instead:
89
- import { HttpSystemDatabase } from '@dbos-inc/dbos-sdk';
90
- import { HttpClient } from '@dbos-inc/dbos-sdk';
91
- ```
92
-
93
- ### Removed Functions
94
-
95
- ```typescript
96
- // These functions are no longer available:
97
- dropPGDatabase(); // Removed
98
- ensurePGDatabase(); // Removed
99
- connectToPGDatabase(); // Removed
100
- getSystemDatabaseUrl(); // Removed
101
- getPGClientConfig(); // Removed
102
- ```
103
-
104
- ### New Error Types
105
-
106
- The SDK now includes HTTP-specific error types:
107
-
108
- ```typescript
109
- import {
110
- DBOSHttpError, // Base HTTP error
111
- DBOSUnauthorizedError, // 401 responses
112
- DBOSForbiddenError, // 403 responses
113
- DBOSNotFoundError, // 404 responses
114
- DBOSRateLimitedError, // 429 responses
115
- DBOSServerError, // 5xx responses
116
- DBOSNetworkError, // Network failures
117
- } from '@dbos-inc/dbos-sdk';
118
- ```
119
-
120
- ## Migration Steps
121
-
122
- ### Step 1: Update Configuration
123
-
124
- Replace your database configuration with HTTP configuration:
125
-
126
- ```typescript
127
- // Before
128
- const config = {
129
- name: 'my-app',
130
- systemDatabaseUrl: process.env.DATABASE_URL,
131
- };
132
-
133
- // After
134
- const config = {
135
- name: 'my-app',
136
- httpConfig: {
137
- apiUrl: process.env.DBOS_API_URL,
138
- apiKey: process.env.DBOS_API_KEY,
139
- },
140
- };
141
-
142
- DBOS.setConfig(config);
143
- ```
144
-
145
- ### Step 2: Update Environment Variables
146
-
147
- Update your deployment environment:
148
-
149
- ```bash
150
- # Remove these
151
- unset PGHOST PGPORT PGUSER PGPASSWORD PGDATABASE DATABASE_URL
152
-
153
- # Add these
154
- export DBOS_API_URL=https://your-laravel-api.com
155
- export DBOS_API_KEY=your-bearer-token
156
- ```
157
-
158
- ### Step 3: Deploy Laravel Backend
159
-
160
- Before your SDK can work, you need to deploy the Laravel API backend that implements the DBOS HTTP API. See `docs/api-schema.md` for the complete API specification.
161
-
162
- ### Step 4: Update DBOSClient Usage
163
-
164
- If you use `DBOSClient` directly:
165
-
166
- ```typescript
167
- // Before
168
- const client = await DBOSClient.create({
169
- systemDatabaseUrl: 'postgresql://...',
170
- });
171
-
172
- // After
173
- const client = await DBOSClient.create({
174
- httpConfig: {
175
- apiUrl: 'https://api.example.com',
176
- apiKey: 'your-api-key',
177
- },
178
- });
179
- ```
180
-
181
- ### Step 5: Update Error Handling
182
-
183
- Update any error handling code to handle new HTTP error types:
184
-
185
- ```typescript
186
- try {
187
- await workflow.execute();
188
- } catch (error) {
189
- if (error instanceof DBOSUnauthorizedError) {
190
- // Handle 401 - invalid API key
191
- } else if (error instanceof DBOSRateLimitedError) {
192
- // Handle 429 - rate limited
193
- const retryAfter = error.retryAfter;
194
- } else if (error instanceof DBOSServerError) {
195
- // Handle 5xx - server error
196
- } else if (error instanceof DBOSNetworkError) {
197
- // Handle network failure
198
- }
199
- }
200
- ```
201
-
202
- ### Step 6: Remove PostgreSQL Dependencies
203
-
204
- Update your `package.json`:
205
-
206
- ```bash
207
- npm uninstall pg @types/pg
208
- ```
209
-
210
- ## Phase 12: Simplified APIs
211
-
212
- The SolidSteps SDK includes simplified APIs that reduce boilerplate for common patterns.
213
-
214
- ### `DBOS.run()` - One-Liner Entry Point
215
-
216
- **Before (verbose pattern):**
217
-
218
- ```typescript
219
- import { DBOS } from '@dbos-inc/dbos-sdk';
220
-
221
- async function main() {
222
- DBOS.setConfig({
223
- name: 'my-app',
224
- api: {
225
- url: process.env.DBOS_API_URL!,
226
- key: process.env.DBOS_API_KEY!,
227
- },
228
- });
229
-
230
- await DBOS.launch();
231
-
232
- const input = process.env.WORKFLOW_INPUT ? JSON.parse(process.env.WORKFLOW_INPUT) : {};
233
-
234
- const handle = await DBOS.startWorkflow(myWorkflow)(input);
235
- await handle.getResult();
236
-
237
- await DBOS.shutdown();
238
- process.exit(0);
239
- }
240
-
241
- main().catch((err) => {
242
- console.error(err);
243
- process.exit(1);
244
- });
245
- ```
246
-
247
- **After (one-liner):**
248
-
249
- ```typescript
250
- import { DBOS } from '@dbos-inc/dbos-sdk';
251
-
252
- const wf = DBOS.registerWorkflow(myWorkflow, { name: 'my-workflow' });
253
- DBOS.run(wf);
254
- ```
255
-
256
- `DBOS.run()` automatically:
257
-
258
- 1. Reads config from `solidsteps.yaml` + environment variables (no `setConfig()` needed)
259
- 2. Calls `launch()`
260
- 3. Parses `WORKFLOW_INPUT` environment variable via `getInput()`
261
- 4. Runs the workflow and awaits result
262
- 5. Calls `shutdown()` and exits with appropriate code
263
-
264
- ### `DBOS.getInput<T>()` - Typed Input Access
265
-
266
- **Before:**
267
-
268
- ```typescript
269
- const rawInput = process.env.WORKFLOW_INPUT || '{}';
270
- let input: MyInputType;
271
- try {
272
- input = JSON.parse(rawInput);
273
- } catch {
274
- input = {} as MyInputType;
275
- }
276
- ```
277
-
278
- **After:**
279
-
280
- ```typescript
281
- interface MyInputType {
282
- taskId: string;
283
- value: number;
284
- }
285
-
286
- const input = DBOS.getInput<MyInputType>();
287
- // Returns {} if WORKFLOW_INPUT not set or invalid JSON
288
- ```
289
-
290
- ### `DBOS.getSignalUrls()` - Signal URL Generation
291
-
292
- **Before (manual URL construction):**
293
-
294
- ```typescript
295
- const workflowId = DBOS.workflowID;
296
- const baseUrl = process.env.APP_URL;
297
- const approveUrl = `${baseUrl}/api/signal/${workflowId}?choice=approve&topic=approval`;
298
- const rejectUrl = `${baseUrl}/api/signal/${workflowId}?choice=reject&topic=approval`;
299
- ```
300
-
301
- **After:**
302
-
303
- ```typescript
304
- const urls = DBOS.getSignalUrls('approval');
305
- // Returns:
306
- // {
307
- // base: "http://localhost:8000/api/signal/{workflowId}",
308
- // approve: "http://localhost:8000/api/signal/{workflowId}?choice=approve&topic=approval",
309
- // reject: "http://localhost:8000/api/signal/{workflowId}?choice=reject&topic=approval",
310
- // custom: (action) => "http://localhost:8000/api/signal/{workflowId}?choice={action}&topic=approval"
311
- // }
312
-
313
- // Use in email templates:
314
- await sendEmail({
315
- to: invoice.email,
316
- subject: 'Invoice Approval',
317
- body: `
318
- <a href="${urls.approve}">Approve</a>
319
- <a href="${urls.reject}">Reject</a>
320
- `,
321
- });
322
- ```
323
-
324
- ### Auto-Configuration from `solidsteps.yaml`
325
-
326
- When `setConfig()` is not called, `launch()` automatically configures from:
327
-
328
- 1. Project name from `solidsteps.yaml`
329
- 2. API URL from `DBOS_API_URL` environment variable
330
- 3. API key from `DBOS_API_KEY` environment variable
331
-
332
- This means tenant workflows can be as simple as:
333
-
334
- ```typescript
335
- import { DBOS } from '@dbos-inc/dbos-sdk';
336
-
337
- async function processOrder(input: OrderInput): Promise<OrderResult> {
338
- const validated = await DBOS.runStep(() => validateOrder(input), {
339
- name: 'validate-order',
340
- });
341
-
342
- await DBOS.sleep(1000); // 1 second delay
343
-
344
- return await DBOS.runStep(() => fulfillOrder(validated), {
345
- name: 'fulfill-order',
346
- });
347
- }
348
-
349
- const wf = DBOS.registerWorkflow(processOrder, { name: 'process-order' });
350
- DBOS.run(wf);
351
- ```
352
-
353
- ## Behavioral Changes
354
-
355
- ### Polling vs Notifications
356
-
357
- **Before (PostgreSQL):** Used PostgreSQL LISTEN/NOTIFY for real-time updates.
358
-
359
- **After (HTTP):** Uses polling for operations like:
360
-
361
- - Waiting for workflow results
362
- - Receiving messages
363
- - Getting events
364
-
365
- The SDK polls every 1 second by default. For high-throughput applications, consider implementing long-polling or WebSocket support in your Laravel backend.
366
-
367
- ### Retry Logic
368
-
369
- The HTTP client includes built-in retry logic:
370
-
371
- - Retries on 5xx errors and network failures
372
- - Uses exponential backoff with jitter
373
- - Respects `Retry-After` headers
374
- - Does NOT retry on 4xx errors (client errors)
375
-
376
- ### Connection Management
377
-
378
- **Before:** SDK managed a PostgreSQL connection pool.
379
-
380
- **After:** SDK uses stateless HTTP requests. Each operation is independent.
381
-
382
- ## Testing
383
-
384
- ### Unit Tests
385
-
386
- Replace PostgreSQL test containers with the mock HTTP server:
387
-
388
- ```typescript
389
- import { createMockServer, MockHttpServer } from '@dbos-inc/dbos-sdk/tests/http_mock_server';
390
-
391
- let mockServer: MockHttpServer;
392
-
393
- beforeAll(async () => {
394
- mockServer = await createMockServer();
395
- });
396
-
397
- afterAll(async () => {
398
- await mockServer.stop();
399
- });
400
-
401
- test('my workflow test', async () => {
402
- const client = await DBOSClient.create({
403
- httpConfig: {
404
- apiUrl: mockServer.baseUrl,
405
- apiKey: 'test-key',
406
- },
407
- });
408
-
409
- // Your test code
410
- });
411
- ```
412
-
413
- ### Integration Tests
414
-
415
- For integration tests, point at your Laravel backend:
416
-
417
- ```typescript
418
- const client = await DBOSClient.create({
419
- httpConfig: {
420
- apiUrl: process.env.DBOS_TEST_API_URL,
421
- apiKey: process.env.DBOS_TEST_API_KEY,
422
- },
423
- });
424
- ```
425
-
426
- ## FAQ
427
-
428
- ### Why was this change made?
429
-
430
- 1. **Simplified deployment** - SDK consumers don't need database credentials
431
- 2. **Better separation of concerns** - Backend owns database, SDK is a pure client
432
- 3. **Multi-tenancy support** - Laravel can handle tenant isolation
433
- 4. **Easier scaling** - Stateless HTTP calls scale better than connection pools
434
-
435
- ### What if I need direct database access?
436
-
437
- The SDK no longer supports direct database access. All workflow state must go through the HTTP API. If you need custom database operations, implement them as API endpoints in your Laravel backend.
438
-
439
- ### How do I handle high-throughput scenarios?
440
-
441
- 1. Implement long-polling in your Laravel backend
442
- 2. Consider WebSocket support for real-time updates
443
- 3. Adjust `maxRetries` and `timeout` in your config
444
- 4. Use queue-based workflows for batch operations
445
-
446
- ### What about existing workflows in my database?
447
-
448
- Existing workflow data must be migrated to the new Laravel-managed database. The schema is documented in `docs/api-schema.md`. You'll need to:
449
-
450
- 1. Export existing workflow data from your PostgreSQL database
451
- 2. Import it into Laravel's database
452
- 3. Point your SDK at the new Laravel API
453
-
454
- ## Support
455
-
456
- For issues with this migration:
457
-
458
- - Check the API schema documentation: `docs/api-schema.md`
459
- - Review the HTTP client source: `src/http_client.ts`
460
- - Open an issue on GitHub
@@ -1,156 +0,0 @@
1
- # Phase 14: SDK Feature Simplification
2
-
3
- **Date:** 2026-01-12
4
-
5
- This document summarizes the changes made in Phase 14 to simplify the SolidSteps DBOS SDK by removing features not needed for ephemeral container architecture.
6
-
7
- ## Rationale
8
-
9
- In SolidSteps, containers are ephemeral - they start, execute a workflow (or portion of one), and exit. Features like long-running schedulers, in-process queues, and debouncing don't make sense in this model:
10
-
11
- - **Scheduling**: Laravel scheduler triggers webhooks at scheduled times
12
- - **Queues**: Laravel/runner handle queue management externally
13
- - **Debouncing**: Should be handled at the API layer before workflow trigger
14
-
15
- ## Files Deleted
16
-
17
- | File | Purpose |
18
- | ---------------------------- | --------------------------------------- |
19
- | `src/scheduler/scheduler.ts` | Cron-based workflow scheduling |
20
- | `src/scheduler/crontab.ts` | Crontab parsing utilities |
21
- | `src/debouncer.ts` | Workflow call debouncing |
22
- | `src/wfqueue.ts` | Workflow queue with concurrency control |
23
-
24
- ## Key SDK Changes
25
-
26
- ### `src/dbos.ts`
27
-
28
- **Removed:**
29
-
30
- - `registerScheduled()` method - registered scheduled workflows
31
- - `@scheduled` decorator - decorator for scheduled workflows
32
- - `withWorkflowQueue()` method - execute workflows in queue context
33
- - `listQueuedWorkflows()` method - list queued workflows
34
- - Scheduler and queue imports
35
-
36
- **Changed:**
37
-
38
- - `initEventReceivers()` no longer takes `listenQueues` parameter
39
-
40
- ### `src/dbos-executor.ts`
41
-
42
- **Removed:**
43
-
44
- - `ScheduledReceiver` instantiation in constructor
45
- - `wfQueueRunner` references and dispatch loop
46
- - `getQueueByName()` method
47
- - `listQueuedWorkflows()` method
48
- - Queue priority validation in `executeWorkflow()`
49
- - `#wfqEnded` promise field
50
- - `createInternalQueue()` static method
51
- - `createDebouncerWorkflow()` static method
52
- - `DBOS_QUEUE_MIN_PRIORITY` and `DBOS_QUEUE_MAX_PRIORITY` constants
53
- - `listenQueues` from `DBOSConfig` interface
54
-
55
- **Changed:**
56
-
57
- - Simplified workflow recovery - no longer re-enqueues to queue
58
- - `initEventReceivers()` simplified to only call lifecycle listeners
59
- - `deactivateEventReceivers()` simplified - no queue runner to stop
60
-
61
- ### `src/index.ts`
62
-
63
- **Removed exports:**
64
-
65
- - `SchedulerMode` - scheduling mode enum
66
- - `SchedulerConfig` - scheduler configuration
67
- - `WorkflowQueue` - queue class
68
- - `Debouncer` - debouncer class
69
- - `DebouncerClient` - client-side debouncer
70
- - `GetQueuedWorkflowsInput` alias
71
-
72
- ### `src/system_database.ts`
73
-
74
- **Removed from `SystemDatabase` interface:**
75
-
76
- - `clearQueueAssignment()` - clear workflow queue assignment
77
- - `getDeduplicatedWorkflow()` - get deduplicated workflow ID
78
- - `getQueuePartitions()` - get queue partition keys
79
- - `findAndMarkStartableWorkflows()` - find and mark startable queued workflows
80
-
81
- **Removed:**
82
-
83
- - `WorkflowQueue` import
84
-
85
- ### `src/http_system_database.ts`
86
-
87
- **Removed methods:**
88
-
89
- - `clearQueueAssignment()` - HTTP call to clear queue assignment
90
- - `getDeduplicatedWorkflow()` - HTTP call to get deduplicated workflow
91
- - `getQueuePartitions()` - HTTP call to get queue partitions
92
- - `findAndMarkStartableWorkflows()` - HTTP call to find startable workflows
93
-
94
- **Removed:**
95
-
96
- - `WorkflowQueue` import
97
- - Entire "Queue Methods" section
98
-
99
- ### `src/client.ts`
100
-
101
- **Removed:**
102
-
103
- - `ClientEnqueueOptions` interface - options for enqueue operation
104
- - `enqueue()` method - enqueue workflow for later execution
105
-
106
- ### `src/adminserver.ts`
107
-
108
- **Removed:**
109
-
110
- - `WorkflowQueuesMetadataUrl` constant
111
- - `QueueMetadataResponse` type
112
- - `registerQueueMetadataEndpoint()` - GET `/dbos-workflow-queues-metadata`
113
- - `registerListQueuedWorkflowsEndpoint()` - POST `/queues`
114
- - `wfQueueRunner` import
115
-
116
- ### `src/conductor/conductor.ts`
117
-
118
- **Removed:**
119
-
120
- - `LIST_QUEUED_WORKFLOWS` message handler case
121
-
122
- ## Migration Notes
123
-
124
- ### For Tenant Developers
125
-
126
- If your workflows used any of these features, here's how to migrate:
127
-
128
- | Removed Feature | Migration Path |
129
- | -------------------------- | --------------------------------------------------------- |
130
- | `@DBOS.scheduled()` | Use Laravel scheduler to trigger webhook at desired times |
131
- | `WorkflowQueue` | Concurrency controlled by runner worker count |
132
- | `DBOS.withWorkflowQueue()` | Remove - not needed |
133
- | `Debouncer` | Implement debouncing in your webhook handler |
134
- | `DBOSClient.enqueue()` | Use `POST /api/webhook/{token}` to trigger workflows |
135
-
136
- ### For Platform Developers
137
-
138
- The following Laravel-side endpoints are no longer called by the SDK:
139
-
140
- - `DELETE /workflows/{id}/queue-assignment`
141
- - `GET /queues/{name}/deduplicated/{deduplicationID}`
142
- - `GET /queues/{name}/partitions`
143
- - `POST /queues/{name}/start-workflows`
144
-
145
- These can be removed from the Laravel API if not used elsewhere.
146
-
147
- ## Verification
148
-
149
- - [x] SDK compiles without errors
150
- - [x] SDK synced to `examples/dbos-test/sdk/`
151
- - [ ] Example workflows tested (pending)
152
- - [ ] SDK unit tests pass (pending)
153
-
154
- ## Related Documentation
155
-
156
- - [SDK Differences](../../docs/dbos-sdk-differences.md) - Updated with "Removed Features" section