@fleettools/server 0.1.0 → 0.1.1
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/package.json +1 -1
- package/.flightline/checkpoints.db +0 -0
- package/.flightline/ctk/04a5510b-1e09-40c6-91c8-399c22138708.json +0 -9
- package/.flightline/ctk/0ecde721-7827-4039-995a-974e24493cc5.json +0 -9
- package/.flightline/ctk/268bbdbd-ddd7-46b2-845f-56a138aa518a.json +0 -9
- package/.flightline/ctk/6f476f2e-776c-407a-b441-b9365c0bae95.json +0 -9
- package/.flightline/ctk/7e10d0d5-fbc2-4661-af03-53de89e064db.json +0 -9
- package/.flightline/ctk/90783096-b7d4-49c5-8153-3c35018a2e61.json +0 -9
- package/.flightline/ctk/9a3b6d18-8a46-4728-90aa-279800a8e397.json +0 -9
- package/.flightline/ctk/ae30e192-b386-4ee2-899c-93f86785d3f3.json +0 -9
- package/.flightline/ctk/d0e9c49e-10df-413e-8cf7-37232b1838ca.json +0 -9
- package/.flightline/ctk/eae1a12b-2e9d-4c3f-8619-dafbb1346e96.json +0 -9
- package/.flightline/mailboxes/mbx_00dae6ba-0b5e-4a8d-a86d-93c8640872c3/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_05b0bfa9-c4f5-4f68-ba75-6202820f49c3/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_0a6b8fb2-729e-4385-8241-839c36b929d7/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_0abca4ab-8e34-409c-997f-481e80e450dc/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_173e5fb9-8203-418d-93c2-4f8c91f2d842/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_22b62201-0570-4ce8-b0a7-0f4b445f6d9e/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_2724efb1-76e1-4147-9620-4defcc65510f/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_35b8bfcd-5a54-48f1-8759-cb1f8ffe775d/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_3bc5193a-604d-4f52-be00-e56277643358/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_3bd500f3-c111-427a-8cd7-a004125d6dc1/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_45ce9ae8-5299-44dc-a1b5-4d63914a9609/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_4779c645-1efc-4c76-ab21-ff93f973ee8f/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_482237cf-87c8-486e-a24d-0941be2f480d/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_4b7e23c8-5680-4edd-a276-88803dd5fb6f/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_4dd3b945-d846-4c7a-94eb-6eeb25a0dc6b/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_4ec41a62-62bb-4be4-b3ce-282d5a33acce/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_4ff7ee7e-0c8a-43d6-a829-7c62c10af3b0/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_7661e4fb-a919-4af1-86f7-3eaef22f1d81/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_7ca872bb-69ab-4e7d-a7c6-4888ec8e7749/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_7e6d5707-2aa5-4770-a7be-6b1be93d0d87/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_87bef50d-3c59-429b-a995-5872f6278c37/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_88d1ea56-0b69-48c4-9fcf-ce1e1f7527ba/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_8bfb6bd7-07d1-4836-ae9d-3c93668c6dfe/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_93355083-e95b-4341-b625-56fcc1e4fc0c/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_999fd94c-ca56-4fec-8d30-8b677cf40ad6/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_a039fd15-7ee1-4bd6-906d-55dea8d0e489/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_a0b7363f-7cc6-4940-8e29-2dc85793a77d/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_a31e8b61-9643-4c78-939d-d1696d0420d9/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_acc51591-256c-4bed-9a51-514b1811f4cd/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_b1efebd9-5981-49fa-8775-20fa00d0c902/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_ba9d4c61-39a3-4852-95d7-bd34e3605a43/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_c549b60f-65fd-48d5-8cd6-2f053292b112/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_d0f839a5-3ab9-42e2-b438-df5825d049fe/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_d826d57e-9817-4f3c-ab94-2bfafa352f6d/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_da102f37-632c-4c0b-be4c-4270a74c06b9/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_df4506f5-67f2-4cf6-9113-93994b76f39b/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_e038e93b-87ea-4122-9578-6540018697b7/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_e0c171c5-407f-44dc-9ef9-e26e8b99ceac/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_e64770bf-7220-4d0f-848c-d751ea1c7376/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_e7f0edda-0fab-484d-ab4d-d8a8e363cd14/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_ec7d9118-8594-4d79-bf79-f43afdfaf156/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_ee06ec01-03e4-485a-ae2b-d8bdb6e7a3a8/manifest.json +0 -6
- package/.flightline/mailboxes/mbx_fd467681-f9cf-4a54-b06a-836df6de2ccc/manifest.json +0 -6
- package/.flightline/progress.db +0 -0
- package/.flightline/recovery.log +0 -1
- package/.flightline/tasks.db +0 -0
- package/.flightline/tech-orders/to_0c93d981-6b4e-4055-8678-f39c009d1db1.json +0 -11
- package/.flightline/tech-orders/to_1862f8ed-c487-4914-9f1e-528af6d4f053.json +0 -11
- package/.flightline/tech-orders/to_2335a57d-f400-4efa-b108-e13ece57520d.json +0 -11
- package/.flightline/tech-orders/to_2bd8dbdd-ac57-4b84-b977-33a3637d10d1.json +0 -11
- package/.flightline/tech-orders/to_37057c01-39b5-403a-991f-afb186abde95.json +0 -11
- package/.flightline/tech-orders/to_9e7288bb-c0fd-488a-a83d-1e9337bd0f1f.json +0 -11
- package/.flightline/tech-orders/to_aa0fe80b-9de7-40f6-a106-353b5bca10bd.json +0 -11
- package/.flightline/tech-orders/to_c1a0f480-c863-4203-a070-76ad77137845.json +0 -11
- package/.flightline/tech-orders/to_cf1e882a-cf56-45a4-8d19-494925e5f449.json +0 -11
- package/.flightline/work-orders/wo_5a29168d-5fb4-41d7-8dac-1d1151d9248f/manifest.json +0 -15
- package/.flightline/work-orders/wo_6c8c38bb-17a1-4885-ada4-dbfc5cc12d7a/manifest.json +0 -15
- package/.flightline/work-orders/wo_cadeb9b2-ea42-4491-b429-e2d467942b5c/manifest.json +0 -12
- package/.flightline/work-orders/wo_cc7b669c-16c4-4ef7-8a76-d1813219d0be/manifest.json +0 -15
- package/dist/server/api/src/coordination/agent-lifecycle.d.ts +0 -12
- package/dist/server/api/src/coordination/agent-lifecycle.d.ts.map +0 -1
- package/dist/server/api/src/coordination/agent-lifecycle.js +0 -12
- package/dist/server/api/src/coordination/agent-lifecycle.js.map +0 -1
- package/dist/server/api/src/coordination/agent-runner.d.ts +0 -9
- package/dist/server/api/src/coordination/agent-runner.d.ts.map +0 -1
- package/dist/server/api/src/coordination/agent-runner.js +0 -416
- package/dist/server/api/src/coordination/agent-runner.js.map +0 -1
- package/dist/server/api/src/coordination/agent-spawner-routes.d.ts +0 -7
- package/dist/server/api/src/coordination/agent-spawner-routes.d.ts.map +0 -1
- package/dist/server/api/src/coordination/agent-spawner-routes.js +0 -321
- package/dist/server/api/src/coordination/agent-spawner-routes.js.map +0 -1
- package/dist/server/api/src/coordination/agent-spawner.d.ts +0 -187
- package/dist/server/api/src/coordination/agent-spawner.d.ts.map +0 -1
- package/dist/server/api/src/coordination/agent-spawner.js +0 -712
- package/dist/server/api/src/coordination/agent-spawner.js.map +0 -1
- package/dist/server/api/src/coordination/agents.d.ts +0 -13
- package/dist/server/api/src/coordination/agents.d.ts.map +0 -1
- package/dist/server/api/src/coordination/agents.js +0 -464
- package/dist/server/api/src/coordination/agents.js.map +0 -1
- package/dist/server/api/src/coordination/checkpoint-routes.d.ts +0 -33
- package/dist/server/api/src/coordination/checkpoint-routes.d.ts.map +0 -1
- package/dist/server/api/src/coordination/checkpoint-routes.js +0 -323
- package/dist/server/api/src/coordination/checkpoint-routes.js.map +0 -1
- package/dist/server/api/src/coordination/conflict-resolver.d.ts +0 -152
- package/dist/server/api/src/coordination/conflict-resolver.d.ts.map +0 -1
- package/dist/server/api/src/coordination/conflict-resolver.js +0 -502
- package/dist/server/api/src/coordination/conflict-resolver.js.map +0 -1
- package/dist/server/api/src/coordination/missions.d.ts +0 -9
- package/dist/server/api/src/coordination/missions.d.ts.map +0 -1
- package/dist/server/api/src/coordination/missions.js +0 -148
- package/dist/server/api/src/coordination/missions.js.map +0 -1
- package/dist/server/api/src/coordination/monitor.d.ts +0 -175
- package/dist/server/api/src/coordination/monitor.d.ts.map +0 -1
- package/dist/server/api/src/coordination/monitor.js +0 -410
- package/dist/server/api/src/coordination/monitor.js.map +0 -1
- package/dist/server/api/src/coordination/notifier.d.ts +0 -160
- package/dist/server/api/src/coordination/notifier.d.ts.map +0 -1
- package/dist/server/api/src/coordination/notifier.js +0 -422
- package/dist/server/api/src/coordination/notifier.js.map +0 -1
- package/dist/server/api/src/coordination/progress-tracker.d.ts +0 -98
- package/dist/server/api/src/coordination/progress-tracker.d.ts.map +0 -1
- package/dist/server/api/src/coordination/progress-tracker.js +0 -323
- package/dist/server/api/src/coordination/progress-tracker.js.map +0 -1
- package/dist/server/api/src/coordination/recovery-manager.d.ts +0 -135
- package/dist/server/api/src/coordination/recovery-manager.d.ts.map +0 -1
- package/dist/server/api/src/coordination/recovery-manager.js +0 -435
- package/dist/server/api/src/coordination/recovery-manager.js.map +0 -1
- package/dist/server/api/src/coordination/task-decomposer.d.ts +0 -90
- package/dist/server/api/src/coordination/task-decomposer.d.ts.map +0 -1
- package/dist/server/api/src/coordination/task-decomposer.js +0 -412
- package/dist/server/api/src/coordination/task-decomposer.js.map +0 -1
- package/dist/server/api/src/coordination/task-queue-routes.d.ts +0 -7
- package/dist/server/api/src/coordination/task-queue-routes.d.ts.map +0 -1
- package/dist/server/api/src/coordination/task-queue-routes.js +0 -266
- package/dist/server/api/src/coordination/task-queue-routes.js.map +0 -1
- package/dist/server/api/src/coordination/task-queue.d.ts +0 -104
- package/dist/server/api/src/coordination/task-queue.d.ts.map +0 -1
- package/dist/server/api/src/coordination/task-queue.js +0 -378
- package/dist/server/api/src/coordination/task-queue.js.map +0 -1
- package/dist/server/api/src/coordination/tasks.d.ts +0 -7
- package/dist/server/api/src/coordination/tasks.d.ts.map +0 -1
- package/dist/server/api/src/coordination/tasks.js +0 -59
- package/dist/server/api/src/coordination/tasks.js.map +0 -1
- package/dist/server/api/src/decomposition/cli.d.ts +0 -18
- package/dist/server/api/src/decomposition/cli.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/cli.js +0 -191
- package/dist/server/api/src/decomposition/cli.js.map +0 -1
- package/dist/server/api/src/decomposition/codebase-analyzer.d.ts +0 -59
- package/dist/server/api/src/decomposition/codebase-analyzer.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/codebase-analyzer.js +0 -274
- package/dist/server/api/src/decomposition/codebase-analyzer.js.map +0 -1
- package/dist/server/api/src/decomposition/dependency-resolver.d.ts +0 -68
- package/dist/server/api/src/decomposition/dependency-resolver.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/dependency-resolver.js +0 -261
- package/dist/server/api/src/decomposition/dependency-resolver.js.map +0 -1
- package/dist/server/api/src/decomposition/index.d.ts +0 -17
- package/dist/server/api/src/decomposition/index.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/index.js +0 -19
- package/dist/server/api/src/decomposition/index.js.map +0 -1
- package/dist/server/api/src/decomposition/parallelization.d.ts +0 -40
- package/dist/server/api/src/decomposition/parallelization.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/parallelization.js +0 -144
- package/dist/server/api/src/decomposition/parallelization.js.map +0 -1
- package/dist/server/api/src/decomposition/planner.d.ts +0 -84
- package/dist/server/api/src/decomposition/planner.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/planner.js +0 -415
- package/dist/server/api/src/decomposition/planner.js.map +0 -1
- package/dist/server/api/src/decomposition/routes.d.ts +0 -13
- package/dist/server/api/src/decomposition/routes.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/routes.js +0 -114
- package/dist/server/api/src/decomposition/routes.js.map +0 -1
- package/dist/server/api/src/decomposition/strategies.d.ts +0 -43
- package/dist/server/api/src/decomposition/strategies.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/strategies.js +0 -147
- package/dist/server/api/src/decomposition/strategies.js.map +0 -1
- package/dist/server/api/src/decomposition/types.d.ts +0 -1090
- package/dist/server/api/src/decomposition/types.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/types.js +0 -65
- package/dist/server/api/src/decomposition/types.js.map +0 -1
- package/dist/server/api/src/decomposition/validator.d.ts +0 -84
- package/dist/server/api/src/decomposition/validator.d.ts.map +0 -1
- package/dist/server/api/src/decomposition/validator.js +0 -314
- package/dist/server/api/src/decomposition/validator.js.map +0 -1
- package/dist/server/api/src/flightline/ctk.d.ts +0 -2
- package/dist/server/api/src/flightline/ctk.d.ts.map +0 -1
- package/dist/server/api/src/flightline/ctk.js +0 -114
- package/dist/server/api/src/flightline/ctk.js.map +0 -1
- package/dist/server/api/src/flightline/tech-orders.d.ts +0 -2
- package/dist/server/api/src/flightline/tech-orders.d.ts.map +0 -1
- package/dist/server/api/src/flightline/tech-orders.js +0 -74
- package/dist/server/api/src/flightline/tech-orders.js.map +0 -1
- package/dist/server/api/src/flightline/work-orders.d.ts +0 -2
- package/dist/server/api/src/flightline/work-orders.d.ts.map +0 -1
- package/dist/server/api/src/flightline/work-orders.js +0 -178
- package/dist/server/api/src/flightline/work-orders.js.map +0 -1
- package/dist/server/api/src/index.d.ts +0 -3
- package/dist/server/api/src/index.d.ts.map +0 -1
- package/dist/server/api/src/index.js +0 -192
- package/dist/server/api/src/index.js.map +0 -1
- package/dist/server/api/src/middleware/agent-validation.d.ts +0 -161
- package/dist/server/api/src/middleware/agent-validation.d.ts.map +0 -1
- package/dist/server/api/src/middleware/agent-validation.js +0 -112
- package/dist/server/api/src/middleware/agent-validation.js.map +0 -1
- package/dist/server/api/src/middleware/error-handler.d.ts +0 -8
- package/dist/server/api/src/middleware/error-handler.d.ts.map +0 -1
- package/dist/server/api/src/middleware/error-handler.js +0 -54
- package/dist/server/api/src/middleware/error-handler.js.map +0 -1
- package/dist/server/api/src/middleware/logger.d.ts +0 -8
- package/dist/server/api/src/middleware/logger.d.ts.map +0 -1
- package/dist/server/api/src/middleware/logger.js +0 -31
- package/dist/server/api/src/middleware/logger.js.map +0 -1
- package/dist/server/api/src/middleware/validation.d.ts +0 -322
- package/dist/server/api/src/middleware/validation.d.ts.map +0 -1
- package/dist/server/api/src/middleware/validation.js +0 -189
- package/dist/server/api/src/middleware/validation.js.map +0 -1
- package/dist/server/api/src/squawk/blocker-handler.d.ts +0 -111
- package/dist/server/api/src/squawk/blocker-handler.d.ts.map +0 -1
- package/dist/server/api/src/squawk/blocker-handler.js +0 -262
- package/dist/server/api/src/squawk/blocker-handler.js.map +0 -1
- package/dist/server/api/src/squawk/coordinator.d.ts +0 -2
- package/dist/server/api/src/squawk/coordinator.d.ts.map +0 -1
- package/dist/server/api/src/squawk/coordinator.js +0 -24
- package/dist/server/api/src/squawk/coordinator.js.map +0 -1
- package/dist/server/api/src/squawk/cursor.d.ts +0 -2
- package/dist/server/api/src/squawk/cursor.d.ts.map +0 -1
- package/dist/server/api/src/squawk/cursor.js +0 -55
- package/dist/server/api/src/squawk/cursor.js.map +0 -1
- package/dist/server/api/src/squawk/dependency-resolver.d.ts +0 -107
- package/dist/server/api/src/squawk/dependency-resolver.d.ts.map +0 -1
- package/dist/server/api/src/squawk/dependency-resolver.js +0 -324
- package/dist/server/api/src/squawk/dependency-resolver.js.map +0 -1
- package/dist/server/api/src/squawk/dispatch-orchestrator.d.ts +0 -117
- package/dist/server/api/src/squawk/dispatch-orchestrator.d.ts.map +0 -1
- package/dist/server/api/src/squawk/dispatch-orchestrator.js +0 -296
- package/dist/server/api/src/squawk/dispatch-orchestrator.js.map +0 -1
- package/dist/server/api/src/squawk/lock-coordinator.d.ts +0 -118
- package/dist/server/api/src/squawk/lock-coordinator.d.ts.map +0 -1
- package/dist/server/api/src/squawk/lock-coordinator.js +0 -279
- package/dist/server/api/src/squawk/lock-coordinator.js.map +0 -1
- package/dist/server/api/src/squawk/lock.d.ts +0 -2
- package/dist/server/api/src/squawk/lock.d.ts.map +0 -1
- package/dist/server/api/src/squawk/lock.js +0 -87
- package/dist/server/api/src/squawk/lock.js.map +0 -1
- package/dist/server/api/src/squawk/mailbox.d.ts +0 -2
- package/dist/server/api/src/squawk/mailbox.d.ts.map +0 -1
- package/dist/server/api/src/squawk/mailbox.js +0 -66
- package/dist/server/api/src/squawk/mailbox.js.map +0 -1
- package/dist/server/api/src/squawk/spawning.d.ts +0 -79
- package/dist/server/api/src/squawk/spawning.d.ts.map +0 -1
- package/dist/server/api/src/squawk/spawning.js +0 -226
- package/dist/server/api/src/squawk/spawning.js.map +0 -1
- package/dist/server/api/src/squawk/specialist-tools.d.ts +0 -206
- package/dist/server/api/src/squawk/specialist-tools.d.ts.map +0 -1
- package/dist/server/api/src/squawk/specialist-tools.js +0 -411
- package/dist/server/api/src/squawk/specialist-tools.js.map +0 -1
- package/dist/server/api/src/types/api.d.ts +0 -63
- package/dist/server/api/src/types/api.d.ts.map +0 -1
- package/dist/server/api/src/types/api.js +0 -5
- package/dist/server/api/src/types/api.js.map +0 -1
- package/dist/squawk/src/db/index.d.ts +0 -30
- package/dist/squawk/src/db/index.d.ts.map +0 -1
- package/dist/squawk/src/db/index.js +0 -329
- package/dist/squawk/src/db/index.js.map +0 -1
- package/dist/squawk/src/db/sqlite.d.ts +0 -31
- package/dist/squawk/src/db/sqlite.d.ts.map +0 -1
- package/dist/squawk/src/db/sqlite.js +0 -558
- package/dist/squawk/src/db/sqlite.js.map +0 -1
- package/dist/squawk/src/db/types.d.ts +0 -611
- package/dist/squawk/src/db/types.d.ts.map +0 -1
- package/dist/squawk/src/db/types.js +0 -4
- package/dist/squawk/src/db/types.js.map +0 -1
- package/e2e-integration.test.ts +0 -290
- package/integration.test.ts +0 -186
- package/phase1-integration.test.ts +0 -455
- package/phase2-verification.test.ts +0 -135
- package/server.log +0 -58
- package/src/agent-runner.js +0 -877
- package/src/coordination/agent-lifecycle.ts +0 -13
- package/src/coordination/agent-runner.ts +0 -479
- package/src/coordination/agent-spawner-routes.ts +0 -340
- package/src/coordination/agent-spawner.ts +0 -885
- package/src/coordination/agents.ts +0 -525
- package/src/coordination/checkpoint-routes.ts +0 -382
- package/src/coordination/conflict-resolver.ts +0 -640
- package/src/coordination/missions.ts +0 -219
- package/src/coordination/monitor.ts +0 -593
- package/src/coordination/notifier.ts +0 -547
- package/src/coordination/progress-tracker.ts +0 -410
- package/src/coordination/recovery-manager.ts +0 -531
- package/src/coordination/task-decomposer.ts +0 -491
- package/src/coordination/task-queue-routes.ts +0 -284
- package/src/coordination/task-queue.ts +0 -480
- package/src/coordination/tasks.ts +0 -72
- package/src/flightline/ctk.ts +0 -131
- package/src/flightline/tech-orders.ts +0 -85
- package/src/flightline/work-orders.ts +0 -202
- package/src/index.ts +0 -211
- package/src/middleware/agent-validation.ts +0 -130
- package/src/middleware/error-handler.ts +0 -59
- package/src/middleware/logger.ts +0 -37
- package/src/middleware/validation.ts +0 -235
- package/src/squawk/coordinator.ts +0 -26
- package/src/squawk/cursor.ts +0 -62
- package/src/squawk/lock.ts +0 -98
- package/src/squawk/mailbox.ts +0 -75
- package/src/types/api.ts +0 -71
- package/test-api.ts +0 -310
- package/test-enhanced-agents.ts +0 -428
package/e2e-integration.test.ts
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* End-to-End Integration Tests for FleetTools
|
|
3
|
-
* Tests CLI → API → Database workflows
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, it, expect, beforeAll, afterAll, beforeEach, afterEach } from 'bun:test';
|
|
7
|
-
import { spawn } from 'node:child_process';
|
|
8
|
-
import { setTimeout } from 'timers/promises';
|
|
9
|
-
|
|
10
|
-
const API_BASE_URL = 'http://localhost:3001';
|
|
11
|
-
const CLI_PATH = './cli/index.ts';
|
|
12
|
-
|
|
13
|
-
describe('FleetTools End-to-End Integration', () => {
|
|
14
|
-
let serverProcess: any;
|
|
15
|
-
let apiPort: number;
|
|
16
|
-
|
|
17
|
-
beforeAll(async () => {
|
|
18
|
-
// Find available port
|
|
19
|
-
apiPort = 3001 + Math.floor(Math.random() * 100);
|
|
20
|
-
|
|
21
|
-
// Start API server
|
|
22
|
-
serverProcess = spawn('bun', ['server/api/src/index.ts'], {
|
|
23
|
-
env: { ...process.env, PORT: apiPort.toString() },
|
|
24
|
-
stdio: 'pipe'
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// Wait for server to start
|
|
28
|
-
await setTimeout(2000);
|
|
29
|
-
|
|
30
|
-
// Verify server is running
|
|
31
|
-
const response = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/health`);
|
|
32
|
-
expect(response.status).toBe(200);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
afterAll(async () => {
|
|
36
|
-
if (serverProcess) {
|
|
37
|
-
serverProcess.kill();
|
|
38
|
-
await setTimeout(1000);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
beforeEach(() => {
|
|
43
|
-
// Clean up any test data
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
afterEach(() => {
|
|
47
|
-
// Clean up any test data
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
describe('CLI → API Integration', () => {
|
|
51
|
-
it('should spawn agent via CLI and verify in API', async () => {
|
|
52
|
-
// Skip if server not available
|
|
53
|
-
try {
|
|
54
|
-
await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/health`);
|
|
55
|
-
} catch {
|
|
56
|
-
console.log('Skipping test - server not available');
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Spawn agent via CLI
|
|
61
|
-
const cliResult = await runCLICommand(['agents', 'spawn', 'testing', 'test task'], {
|
|
62
|
-
FLEETTOOLS_API_URL: API_BASE_URL.replace('3001', apiPort.toString())
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
expect(cliResult.exitCode).toBe(0);
|
|
66
|
-
expect(cliResult.stdout).toContain('Agent spawned successfully');
|
|
67
|
-
|
|
68
|
-
// Extract agent ID from CLI output
|
|
69
|
-
const agentIdMatch = cliResult.stdout.match(/Agent ID: (.+)/);
|
|
70
|
-
expect(agentIdMatch).toBeTruthy();
|
|
71
|
-
|
|
72
|
-
const agentId = agentIdMatch?.[1]?.trim();
|
|
73
|
-
expect(agentId).toBeTruthy();
|
|
74
|
-
|
|
75
|
-
// Verify agent exists via API
|
|
76
|
-
const apiResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/agents`);
|
|
77
|
-
const apiData = await apiResponse.json();
|
|
78
|
-
|
|
79
|
-
expect(apiData.success).toBe(true);
|
|
80
|
-
expect(apiData.data.agents).toBeDefined();
|
|
81
|
-
|
|
82
|
-
const spawnedAgent = apiData.data.agents.find((agent: any) => agent.id === agentId);
|
|
83
|
-
expect(spawnedAgent).toBeTruthy();
|
|
84
|
-
expect(spawnedAgent.type).toBe('testing');
|
|
85
|
-
expect(spawnedAgent.status).toBe('running');
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it('should list agents via CLI and match API data', async () => {
|
|
89
|
-
// List agents via CLI
|
|
90
|
-
const cliResult = await runCLICommand(['agents', 'status'], {
|
|
91
|
-
FLEETTOOLS_API_URL: API_BASE_URL.replace('3001', apiPort.toString())
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
expect(cliResult.exitCode).toBe(0);
|
|
95
|
-
expect(cliResult.stdout).toContain('Found');
|
|
96
|
-
|
|
97
|
-
// Get agents via API
|
|
98
|
-
const apiResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/agents`);
|
|
99
|
-
const apiData = await apiResponse.json();
|
|
100
|
-
|
|
101
|
-
expect(apiData.success).toBe(true);
|
|
102
|
-
|
|
103
|
-
// Both should show same count
|
|
104
|
-
const cliAgentCount = (cliResult.stdout.match(/agent\(s\):/g) || [''])[0];
|
|
105
|
-
const apiAgentCount = apiData.data.agents?.length || 0;
|
|
106
|
-
|
|
107
|
-
// At minimum, both should be valid responses
|
|
108
|
-
expect(cliResult.stdout).toBeDefined();
|
|
109
|
-
expect(apiData.data).toBeDefined();
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
it('should handle invalid agent type in CLI', async () => {
|
|
113
|
-
const cliResult = await runCLICommand(['agents', 'spawn', 'invalid-type'], {
|
|
114
|
-
FLEETTOOLS_API_URL: API_BASE_URL.replace('3001', apiPort.toString())
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
expect(cliResult.exitCode).toBe(1);
|
|
118
|
-
expect(cliResult.stderr).toContain('Invalid agent type');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
describe('Task Management Integration', () => {
|
|
123
|
-
it('should create task via API and verify database operations', async () => {
|
|
124
|
-
const taskData = {
|
|
125
|
-
type: 'development',
|
|
126
|
-
title: 'Test Task',
|
|
127
|
-
description: 'Integration test task',
|
|
128
|
-
priority: 'medium'
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
// Create task via API
|
|
132
|
-
const createResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/tasks`, {
|
|
133
|
-
method: 'POST',
|
|
134
|
-
headers: { 'Content-Type': 'application/json' },
|
|
135
|
-
body: JSON.stringify(taskData)
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
expect(createResponse.status).toBe(201);
|
|
139
|
-
const createData = await createResponse.json();
|
|
140
|
-
expect(createData.success).toBe(true);
|
|
141
|
-
expect(createData.data.title).toBe(taskData.title);
|
|
142
|
-
|
|
143
|
-
// Get task via API
|
|
144
|
-
const taskId = createData.data.id;
|
|
145
|
-
const getResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/tasks/${taskId}`);
|
|
146
|
-
const getData = await getResponse.json();
|
|
147
|
-
|
|
148
|
-
expect(getData.success).toBe(true);
|
|
149
|
-
expect(getData.data.title).toBe(taskData.title);
|
|
150
|
-
expect(getData.data.status).toBe('pending');
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('should update task status through workflow', async () => {
|
|
154
|
-
// Create task
|
|
155
|
-
const createResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/tasks`, {
|
|
156
|
-
method: 'POST',
|
|
157
|
-
headers: { 'Content-Type': 'application/json' },
|
|
158
|
-
body: JSON.stringify({
|
|
159
|
-
type: 'testing',
|
|
160
|
-
title: 'Workflow Test Task',
|
|
161
|
-
description: 'Test task for workflow'
|
|
162
|
-
})
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
const createData = await createResponse.json();
|
|
166
|
-
const taskId = createData.data.id;
|
|
167
|
-
|
|
168
|
-
// Start task
|
|
169
|
-
const startResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/tasks/${taskId}/start`, {
|
|
170
|
-
method: 'PATCH'
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
expect(startResponse.status).toBe(200);
|
|
174
|
-
const startData = await startResponse.json();
|
|
175
|
-
expect(startData.data.status).toBe('in_progress');
|
|
176
|
-
|
|
177
|
-
// Complete task
|
|
178
|
-
const completeResponse = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/tasks/${taskId}/complete`, {
|
|
179
|
-
method: 'PATCH',
|
|
180
|
-
headers: { 'Content-Type': 'application/json' },
|
|
181
|
-
body: JSON.stringify({ result: 'Task completed successfully' })
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
expect(completeResponse.status).toBe(200);
|
|
185
|
-
const completeData = await completeResponse.json();
|
|
186
|
-
expect(completeData.data.status).toBe('completed');
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
describe('Checkpoint Integration', () => {
|
|
191
|
-
it('should create checkpoint through CLI workflow', async () => {
|
|
192
|
-
// This will test the unstubbed checkpoint command
|
|
193
|
-
const cliResult = await runCLICommand(['checkpoint', '--note', 'Integration test checkpoint'], {
|
|
194
|
-
FLEETTOOLS_API_URL: API_BASE_URL.replace('3001', apiPort.toString())
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
// For now, expect the stubbed response
|
|
198
|
-
// After implementation, expect success
|
|
199
|
-
expect(cliResult.exitCode).toBeDefined();
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
it('should handle resume command', async () => {
|
|
203
|
-
const cliResult = await runCLICommand(['resume'], {
|
|
204
|
-
FLEETTOOLS_API_URL: API_BASE_URL.replace('3001', apiPort.toString())
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
// For now, expect the stubbed response
|
|
208
|
-
// After implementation, expect success
|
|
209
|
-
expect(cliResult.exitCode).toBeDefined();
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
describe('Error Handling Integration', () => {
|
|
214
|
-
it('should handle API server unavailable gracefully', async () => {
|
|
215
|
-
const cliResult = await runCLICommand(['agents', 'status'], {
|
|
216
|
-
FLEETTOOLS_API_URL: 'http://localhost:9999' // Unavailable port
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
expect(cliResult.exitCode).toBe(1);
|
|
220
|
-
expect(cliResult.stderr).toContain('Error');
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
it('should handle malformed API responses', async () => {
|
|
224
|
-
// This would test API error handling
|
|
225
|
-
const response = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/agents/invalid-id`);
|
|
226
|
-
|
|
227
|
-
expect([404, 500]).toContain(response.status);
|
|
228
|
-
|
|
229
|
-
const data = await response.json();
|
|
230
|
-
expect(data.error).toBeDefined();
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
describe('Database Persistence', () => {
|
|
235
|
-
it('should persist agent data across server restarts', async () => {
|
|
236
|
-
// This test would require server restart capability
|
|
237
|
-
// For now, test basic data persistence
|
|
238
|
-
const response = await fetch(`${API_BASE_URL.replace('3001', apiPort.toString())}/api/v1/agents`);
|
|
239
|
-
const data = await response.json();
|
|
240
|
-
|
|
241
|
-
expect(data.success).toBe(true);
|
|
242
|
-
expect(data.data).toBeDefined();
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Helper function to run CLI commands
|
|
249
|
-
*/
|
|
250
|
-
async function runCLICommand(args: string[], env: Record<string, string> = {}): Promise<{
|
|
251
|
-
exitCode: number;
|
|
252
|
-
stdout: string;
|
|
253
|
-
stderr: string;
|
|
254
|
-
}> {
|
|
255
|
-
return new Promise((resolve) => {
|
|
256
|
-
const cliProcess = spawn('bun', [CLI_PATH, ...args], {
|
|
257
|
-
env: { ...process.env, ...env },
|
|
258
|
-
stdio: 'pipe'
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
let stdout = '';
|
|
262
|
-
let stderr = '';
|
|
263
|
-
|
|
264
|
-
cliProcess.stdout?.on('data', (data) => {
|
|
265
|
-
stdout += data.toString();
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
cliProcess.stderr?.on('data', (data) => {
|
|
269
|
-
stderr += data.toString();
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
cliProcess.on('close', (code) => {
|
|
273
|
-
resolve({
|
|
274
|
-
exitCode: code || 0,
|
|
275
|
-
stdout,
|
|
276
|
-
stderr
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
// Timeout after 10 seconds
|
|
281
|
-
global.setTimeout(() => {
|
|
282
|
-
cliProcess.kill();
|
|
283
|
-
resolve({
|
|
284
|
-
exitCode: 1,
|
|
285
|
-
stdout,
|
|
286
|
-
stderr: 'Command timed out'
|
|
287
|
-
});
|
|
288
|
-
}, 10000);
|
|
289
|
-
});
|
|
290
|
-
}
|
package/integration.test.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration Tests for Critical Infrastructure
|
|
3
|
-
* Tests API registration, database integration, and CLI connectivity
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, it, expect, beforeAll, afterAll } from 'bun:test';
|
|
7
|
-
|
|
8
|
-
describe('Critical Infrastructure Integration', () => {
|
|
9
|
-
let server: any;
|
|
10
|
-
let baseUrl: string;
|
|
11
|
-
|
|
12
|
-
beforeAll(async () => {
|
|
13
|
-
// Start the server
|
|
14
|
-
server = await import('../src/index.js');
|
|
15
|
-
baseUrl = `http://localhost:${process.env.PORT || 3001}`;
|
|
16
|
-
|
|
17
|
-
// Give server time to start
|
|
18
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
afterAll(async () => {
|
|
22
|
-
if (server?.server?.stop) {
|
|
23
|
-
server.server.stop();
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
describe('API Registration Tests', () => {
|
|
28
|
-
it('should have health endpoint working', async () => {
|
|
29
|
-
const response = await fetch(`${baseUrl}/health`);
|
|
30
|
-
expect(response.status).toBe(200);
|
|
31
|
-
|
|
32
|
-
const data = await response.json();
|
|
33
|
-
expect(data).toHaveProperty('status', 'healthy');
|
|
34
|
-
expect(data).toHaveProperty('service', 'fleettools-consolidated');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('should have all Flightline endpoints registered', async () => {
|
|
38
|
-
// Test work orders endpoint
|
|
39
|
-
const workOrdersResponse = await fetch(`${baseUrl}/api/v1/work-orders`);
|
|
40
|
-
expect([200, 404, 405]).toContain(workOrdersResponse.status); // 404 is ok if no data, 405 if method not allowed
|
|
41
|
-
|
|
42
|
-
// Test tech orders endpoint
|
|
43
|
-
const techOrdersResponse = await fetch(`${baseUrl}/api/v1/tech-orders`);
|
|
44
|
-
expect([200, 404, 405]).toContain(techOrdersResponse.status);
|
|
45
|
-
|
|
46
|
-
// Test CTK endpoints
|
|
47
|
-
const ctkResponse = await fetch(`${baseUrl}/api/v1/ctk/reservations`);
|
|
48
|
-
expect([200, 404, 405]).toContain(ctkResponse.status);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('should have all Squawk endpoints registered', async () => {
|
|
52
|
-
// Test mailbox endpoint
|
|
53
|
-
const mailboxResponse = await fetch(`${baseUrl}/api/v1/mailbox/test-stream`, {
|
|
54
|
-
method: 'GET'
|
|
55
|
-
});
|
|
56
|
-
expect([200, 404, 405]).toContain(mailboxResponse.status);
|
|
57
|
-
|
|
58
|
-
// Test cursor endpoint
|
|
59
|
-
const cursorResponse = await fetch(`${baseUrl}/api/v1/cursor/test-cursor`);
|
|
60
|
-
expect([200, 404, 405]).toContain(cursorResponse.status);
|
|
61
|
-
|
|
62
|
-
// Test lock endpoint
|
|
63
|
-
const locksResponse = await fetch(`${baseUrl}/api/v1/locks`);
|
|
64
|
-
expect([200, 404, 405]).toContain(locksResponse.status);
|
|
65
|
-
|
|
66
|
-
// Test coordinator endpoint
|
|
67
|
-
const coordinatorResponse = await fetch(`${baseUrl}/api/v1/coordinator/status`);
|
|
68
|
-
expect([200, 404, 405]).toContain(coordinatorResponse.status);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('should have all Coordination endpoints registered', async () => {
|
|
72
|
-
// Test agents endpoint
|
|
73
|
-
const agentsResponse = await fetch(`${baseUrl}/api/v1/agents`);
|
|
74
|
-
expect([200, 404, 405]).toContain(agentsResponse.status);
|
|
75
|
-
|
|
76
|
-
// Test missions endpoint
|
|
77
|
-
const missionsResponse = await fetch(`${baseUrl}/api/v1/missions`);
|
|
78
|
-
expect([200, 404, 405]).toContain(missionsResponse.status);
|
|
79
|
-
|
|
80
|
-
// Test tasks endpoint
|
|
81
|
-
const tasksResponse = await fetch(`${baseUrl}/api/v1/tasks/decompose`, {
|
|
82
|
-
method: 'POST',
|
|
83
|
-
headers: { 'Content-Type': 'application/json' },
|
|
84
|
-
body: JSON.stringify({ mission: 'test' })
|
|
85
|
-
});
|
|
86
|
-
expect([200, 400, 404, 405]).toContain(tasksResponse.status);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
describe('Database Integration Tests', () => {
|
|
91
|
-
it('should have database operations working', async () => {
|
|
92
|
-
// Test that database is accessible through operations
|
|
93
|
-
const { initializeDatabase, closeDatabase } = await import('../../squawk/src/db/index.js');
|
|
94
|
-
|
|
95
|
-
expect(async () => {
|
|
96
|
-
await initializeDatabase();
|
|
97
|
-
}).not.toThrow();
|
|
98
|
-
|
|
99
|
-
closeDatabase();
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it('should have checkpoint operations exposed', async () => {
|
|
103
|
-
// Test checkpoint functionality through progress tracker
|
|
104
|
-
const { ProgressTracker } = await import('../src/coordination/progress-tracker.js');
|
|
105
|
-
|
|
106
|
-
const progressTracker = new ProgressTracker({
|
|
107
|
-
dbPath: './test-progress.db'
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
expect(async () => {
|
|
111
|
-
await progressTracker.checkpoint('test-mission', 'task1', 50, 'Test progress');
|
|
112
|
-
}).not.toThrow();
|
|
113
|
-
|
|
114
|
-
expect(async () => {
|
|
115
|
-
const progress = await progressTracker.getProgress('test-mission');
|
|
116
|
-
expect(progress).toBeDefined();
|
|
117
|
-
}).not.toThrow();
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
describe('End-to-End Workflow Tests', () => {
|
|
122
|
-
it('should support agent spawning workflow', async () => {
|
|
123
|
-
// Test agent spawning endpoint
|
|
124
|
-
const spawnResponse = await fetch(`${baseUrl}/api/v1/agents/spawn`, {
|
|
125
|
-
method: 'POST',
|
|
126
|
-
headers: { 'Content-Type': 'application/json' },
|
|
127
|
-
body: JSON.stringify({
|
|
128
|
-
type: 'testing',
|
|
129
|
-
task: 'Test task',
|
|
130
|
-
config: { timeout: 5000 }
|
|
131
|
-
})
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
expect([200, 201, 400, 500]).toContain(spawnResponse.status);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
it('should support task decomposition workflow', async () => {
|
|
138
|
-
// Test task decomposition endpoint
|
|
139
|
-
const decomposeResponse = await fetch(`${baseUrl}/api/v1/tasks/decompose`, {
|
|
140
|
-
method: 'POST',
|
|
141
|
-
headers: { 'Content-Type': 'application/json' },
|
|
142
|
-
body: JSON.stringify({
|
|
143
|
-
mission: {
|
|
144
|
-
title: 'Test Mission',
|
|
145
|
-
description: 'Test description',
|
|
146
|
-
type: 'development'
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
expect([200, 400, 404]).toContain(decomposeResponse.status);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
it('should support mission management workflow', async () => {
|
|
155
|
-
// Test mission creation endpoint
|
|
156
|
-
const createMissionResponse = await fetch(`${baseUrl}/api/v1/missions`, {
|
|
157
|
-
method: 'POST',
|
|
158
|
-
headers: { 'Content-Type': 'application/json' },
|
|
159
|
-
body: JSON.stringify({
|
|
160
|
-
title: 'Test Mission',
|
|
161
|
-
description: 'Test mission description',
|
|
162
|
-
type: 'development'
|
|
163
|
-
})
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
expect([200, 201, 400, 404]).toContain(createMissionResponse.status);
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
describe('Error Handling Tests', () => {
|
|
171
|
-
it('should handle 404 for unknown routes', async () => {
|
|
172
|
-
const response = await fetch(`${baseUrl}/api/v1/unknown-endpoint`);
|
|
173
|
-
expect(response.status).toBe(404);
|
|
174
|
-
|
|
175
|
-
const data = await response.json();
|
|
176
|
-
expect(data).toHaveProperty('error');
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it('should handle OPTIONS requests for CORS', async () => {
|
|
180
|
-
const response = await fetch(`${baseUrl}/api/v1/test`, {
|
|
181
|
-
method: 'OPTIONS'
|
|
182
|
-
});
|
|
183
|
-
expect([200, 204]).toContain(response.status);
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
});
|