@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
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* Integration Tests for FleetTools Phase 1 Critical Fixes
|
|
4
|
-
*
|
|
5
|
-
* Tests the end-to-end workflow: spawn → execute → checkpoint → resume
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { describe, it, expect, beforeAll, afterAll } from 'bun:test';
|
|
9
|
-
import { spawn } from 'node:child_process';
|
|
10
|
-
import { randomUUID } from 'node:crypto';
|
|
11
|
-
|
|
12
|
-
const API_BASE = process.env.FLEETTOOLS_API_URL || 'http://localhost:3001';
|
|
13
|
-
const SERVER_STARTUP_TIMEOUT = 10000;
|
|
14
|
-
|
|
15
|
-
interface AgentSpawnRequest {
|
|
16
|
-
type: 'frontend' | 'backend' | 'testing' | 'documentation' | 'security' | 'performance';
|
|
17
|
-
task?: string;
|
|
18
|
-
metadata?: Record<string, any>;
|
|
19
|
-
config?: {
|
|
20
|
-
timeout?: number;
|
|
21
|
-
retries?: number;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface CheckpointData {
|
|
26
|
-
id: string;
|
|
27
|
-
mission_id: string;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
trigger: 'manual' | 'auto' | 'error' | 'completion';
|
|
30
|
-
progress_percent?: number;
|
|
31
|
-
created_by: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
describe('FleetTools Phase 1 Integration', () => {
|
|
35
|
-
let serverProcess: any;
|
|
36
|
-
let agentIds: string[] = [];
|
|
37
|
-
|
|
38
|
-
beforeAll(async () => {
|
|
39
|
-
// Start the server if not already running
|
|
40
|
-
try {
|
|
41
|
-
const response = await fetch(`${API_BASE}/health`);
|
|
42
|
-
if (!response.ok) {
|
|
43
|
-
throw new Error('Server not healthy');
|
|
44
|
-
}
|
|
45
|
-
console.log('✓ Server already running');
|
|
46
|
-
} catch (error) {
|
|
47
|
-
console.log('Starting FleetTools server...');
|
|
48
|
-
serverProcess = spawn('bun', ['run', 'dev'], {
|
|
49
|
-
cwd: '/home/vitruvius/git/fleettools/server/api',
|
|
50
|
-
stdio: 'pipe'
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Wait for server to start
|
|
54
|
-
await new Promise((resolve, reject) => {
|
|
55
|
-
const timeout = setTimeout(() => {
|
|
56
|
-
reject(new Error('Server startup timeout'));
|
|
57
|
-
}, SERVER_STARTUP_TIMEOUT);
|
|
58
|
-
|
|
59
|
-
const checkServer = async () => {
|
|
60
|
-
try {
|
|
61
|
-
const response = await fetch(`${API_BASE}/health`);
|
|
62
|
-
if (response.ok) {
|
|
63
|
-
clearTimeout(timeout);
|
|
64
|
-
resolve(null);
|
|
65
|
-
} else {
|
|
66
|
-
setTimeout(checkServer, 500);
|
|
67
|
-
}
|
|
68
|
-
} catch (err) {
|
|
69
|
-
setTimeout(checkServer, 500);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
checkServer();
|
|
74
|
-
});
|
|
75
|
-
console.log('✓ Server started successfully');
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
afterAll(async () => {
|
|
80
|
-
// Clean up any spawned agents
|
|
81
|
-
for (const agentId of agentIds) {
|
|
82
|
-
try {
|
|
83
|
-
await fetch(`${API_BASE}/api/v1/agents/${agentId}`, {
|
|
84
|
-
method: 'DELETE'
|
|
85
|
-
});
|
|
86
|
-
} catch (error) {
|
|
87
|
-
console.warn(`Failed to cleanup agent ${agentId}:`, error);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Stop server if we started it
|
|
92
|
-
if (serverProcess) {
|
|
93
|
-
serverProcess.kill('SIGTERM');
|
|
94
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
describe('Agent Spawning API Routes', () => {
|
|
99
|
-
it('should spawn a new agent via API', async () => {
|
|
100
|
-
const spawnRequest: AgentSpawnRequest = {
|
|
101
|
-
type: 'testing',
|
|
102
|
-
task: 'Run integration tests',
|
|
103
|
-
metadata: { test: 'phase1-integration' },
|
|
104
|
-
config: { timeout: 30000 }
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const response = await fetch(`${API_BASE}/api/v1/agents/spawn`, {
|
|
108
|
-
method: 'POST',
|
|
109
|
-
headers: { 'Content-Type': 'application/json' },
|
|
110
|
-
body: JSON.stringify(spawnRequest)
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
expect(response.ok).toBe(true);
|
|
114
|
-
const data = await response.json();
|
|
115
|
-
expect(data.success).toBe(true);
|
|
116
|
-
expect(data.data.agent.id).toMatch(/^agt_/);
|
|
117
|
-
expect(data.data.agent.type).toBe('testing');
|
|
118
|
-
expect(data.data.agent.status).toMatch(/running|spawning/); // Initial status
|
|
119
|
-
|
|
120
|
-
agentIds.push(data.data.agent.id);
|
|
121
|
-
|
|
122
|
-
// Wait a bit for agent to start
|
|
123
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
124
|
-
|
|
125
|
-
// Verify agent is running
|
|
126
|
-
const agentResponse = await fetch(`${API_BASE}/api/v1/agents/${data.data.agent.id}`);
|
|
127
|
-
expect(agentResponse.ok).toBe(true);
|
|
128
|
-
const agentData = await agentResponse.json();
|
|
129
|
-
expect(agentData.success).toBe(true);
|
|
130
|
-
expect(agentData.data.agent.status).toMatch(/running|spawning/);
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it('should list all active agents', async () => {
|
|
134
|
-
const response = await fetch(`${API_BASE}/api/v1/agents`);
|
|
135
|
-
expect(response.ok).toBe(true);
|
|
136
|
-
|
|
137
|
-
const data = await response.json();
|
|
138
|
-
expect(data.success).toBe(true);
|
|
139
|
-
expect(Array.isArray(data.data.agents)).toBe(true);
|
|
140
|
-
expect(data.data.total).toBeGreaterThanOrEqual(0);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it('should validate agent type on spawn', async () => {
|
|
144
|
-
const invalidRequest = {
|
|
145
|
-
type: 'invalid-type',
|
|
146
|
-
task: 'test'
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
const response = await fetch(`${API_BASE}/api/v1/agents/spawn`, {
|
|
150
|
-
method: 'POST',
|
|
151
|
-
headers: { 'Content-Type': 'application/json' },
|
|
152
|
-
body: JSON.stringify(invalidRequest)
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
expect(response.ok).toBe(false);
|
|
156
|
-
expect(response.status).toBe(400);
|
|
157
|
-
|
|
158
|
-
const data = await response.json();
|
|
159
|
-
expect(data.error).toContain('Invalid agent type');
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
describe('Database Integration for Checkpoints', () => {
|
|
164
|
-
let checkpointId: string;
|
|
165
|
-
const missionId = `msn-test-${randomUUID()}`;
|
|
166
|
-
|
|
167
|
-
it('should create checkpoint via API', async () => {
|
|
168
|
-
const checkpointRequest = {
|
|
169
|
-
mission_id: missionId,
|
|
170
|
-
trigger: 'manual',
|
|
171
|
-
trigger_details: 'Integration test checkpoint',
|
|
172
|
-
progress_percent: 45,
|
|
173
|
-
sorties: [
|
|
174
|
-
{
|
|
175
|
-
id: 'srt-1',
|
|
176
|
-
status: 'completed',
|
|
177
|
-
progress: 100
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
active_locks: [],
|
|
181
|
-
pending_messages: [],
|
|
182
|
-
recovery_context: {
|
|
183
|
-
last_action: 'integration_test',
|
|
184
|
-
next_steps: ['complete testing'],
|
|
185
|
-
blockers: [],
|
|
186
|
-
files_modified: ['test-file.ts'],
|
|
187
|
-
mission_summary: 'Integration test mission',
|
|
188
|
-
elapsed_time_ms: 120000,
|
|
189
|
-
last_activity_at: new Date().toISOString()
|
|
190
|
-
},
|
|
191
|
-
created_by: 'integration-test',
|
|
192
|
-
version: '1.0.0'
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
const response = await fetch(`${API_BASE}/api/v1/checkpoints`, {
|
|
196
|
-
method: 'POST',
|
|
197
|
-
headers: { 'Content-Type': 'application/json' },
|
|
198
|
-
body: JSON.stringify(checkpointRequest)
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
expect(response.ok).toBe(true);
|
|
202
|
-
const data = await response.json();
|
|
203
|
-
expect(data.success).toBe(true);
|
|
204
|
-
expect(data.data.id).toMatch(/^chk_/);
|
|
205
|
-
expect(data.data.mission_id).toBe(missionId);
|
|
206
|
-
expect(data.data.trigger).toBe('manual');
|
|
207
|
-
expect(data.data.progress_percent).toBe(45);
|
|
208
|
-
|
|
209
|
-
checkpointId = data.data.id;
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
it('should retrieve checkpoint by ID', async () => {
|
|
213
|
-
const response = await fetch(`${API_BASE}/api/v1/checkpoints/${checkpointId}`);
|
|
214
|
-
expect(response.ok).toBe(true);
|
|
215
|
-
|
|
216
|
-
const data = await response.json();
|
|
217
|
-
expect(data.success).toBe(true);
|
|
218
|
-
expect(data.data.id).toBe(checkpointId);
|
|
219
|
-
expect(data.data.mission_id).toBe(missionId);
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
it('should get latest checkpoint for mission', async () => {
|
|
223
|
-
const response = await fetch(`${API_BASE}/api/v1/checkpoints/latest/${missionId}`);
|
|
224
|
-
expect(response.ok).toBe(true);
|
|
225
|
-
|
|
226
|
-
const data = await response.json();
|
|
227
|
-
expect(data.success).toBe(true);
|
|
228
|
-
expect(data.data.id).toBe(checkpointId);
|
|
229
|
-
expect(data.data.mission_id).toBe(missionId);
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
it('should list checkpoints for mission', async () => {
|
|
233
|
-
const response = await fetch(`${API_BASE}/api/v1/checkpoints?mission_id=${missionId}`);
|
|
234
|
-
expect(response.ok).toBe(true);
|
|
235
|
-
|
|
236
|
-
const data = await response.json();
|
|
237
|
-
expect(data.success).toBe(true);
|
|
238
|
-
expect(Array.isArray(data.data)).toBe(true);
|
|
239
|
-
expect(data.data.length).toBeGreaterThanOrEqual(1);
|
|
240
|
-
expect(data.data[0].mission_id).toBe(missionId);
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
afterAll(async () => {
|
|
244
|
-
// Cleanup test checkpoint
|
|
245
|
-
try {
|
|
246
|
-
await fetch(`${API_BASE}/api/v1/checkpoints/${checkpointId}`, {
|
|
247
|
-
method: 'DELETE'
|
|
248
|
-
});
|
|
249
|
-
} catch (error) {
|
|
250
|
-
console.warn(`Failed to cleanup checkpoint ${checkpointId}:`, error);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
describe('Coordination Endpoint Routing', () => {
|
|
256
|
-
it('should handle mailbox operations', async () => {
|
|
257
|
-
const mailboxRequest = {
|
|
258
|
-
streamId: `test-stream-${randomUUID()}`,
|
|
259
|
-
events: [
|
|
260
|
-
{
|
|
261
|
-
type: 'test-event',
|
|
262
|
-
data: { message: 'integration test' },
|
|
263
|
-
timestamp: new Date().toISOString()
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
const response = await fetch(`${API_BASE}/api/v1/mailbox/append`, {
|
|
269
|
-
method: 'POST',
|
|
270
|
-
headers: { 'Content-Type': 'application/json' },
|
|
271
|
-
body: JSON.stringify(mailboxRequest)
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
// Should either succeed or fail gracefully (not 500)
|
|
275
|
-
expect([200, 201, 400, 404]).toContain(response.status);
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
it('should handle cursor operations', async () => {
|
|
279
|
-
const cursorRequest = {
|
|
280
|
-
cursorId: `test-cursor-${randomUUID()}`,
|
|
281
|
-
position: 10,
|
|
282
|
-
timestamp: new Date().toISOString()
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
const response = await fetch(`${API_BASE}/api/v1/cursor/advance`, {
|
|
286
|
-
method: 'POST',
|
|
287
|
-
headers: { 'Content-Type': 'application/json' },
|
|
288
|
-
body: JSON.stringify(cursorRequest)
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
// Should either succeed or fail gracefully (not 500)
|
|
292
|
-
expect([200, 201, 400, 404]).toContain(response.status);
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
it('should handle lock operations', async () => {
|
|
296
|
-
const lockRequest = {
|
|
297
|
-
resourceId: `test-resource-${randomUUID()}`,
|
|
298
|
-
agentId: agentIds[0] || 'test-agent',
|
|
299
|
-
timeout: 60000
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
const response = await fetch(`${API_BASE}/api/v1/lock/acquire`, {
|
|
303
|
-
method: 'POST',
|
|
304
|
-
headers: { 'Content-Type': 'application/json' },
|
|
305
|
-
body: JSON.stringify(lockRequest)
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
// Should either succeed or fail gracefully (not 500)
|
|
309
|
-
expect([200, 201, 400, 404, 409]).toContain(response.status);
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
it('should get coordinator status', async () => {
|
|
313
|
-
const response = await fetch(`${API_BASE}/api/v1/coordinator/status`);
|
|
314
|
-
expect(response.ok).toBe(true);
|
|
315
|
-
|
|
316
|
-
const data = await response.json();
|
|
317
|
-
// Coordinator endpoint returns data directly without success wrapper
|
|
318
|
-
expect(data.active_mailboxes).toBeDefined();
|
|
319
|
-
expect(data.active_locks).toBeDefined();
|
|
320
|
-
expect(data.timestamp).toBeDefined();
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
describe('Agent-Runner Implementation', () => {
|
|
325
|
-
it('should execute agent-runner script directly', async () => {
|
|
326
|
-
const agentId = `agt-test-${randomUUID()}`;
|
|
327
|
-
const mailboxId = `mbx-test-${randomUUID()}`;
|
|
328
|
-
|
|
329
|
-
const runnerProcess = spawn('bun', [
|
|
330
|
-
'/home/vitruvius/git/fleettools/server/api/src/coordination/agent-runner.ts',
|
|
331
|
-
'--agent-id', agentId,
|
|
332
|
-
'--agent-type', 'testing',
|
|
333
|
-
'--mailbox-id', mailboxId,
|
|
334
|
-
'--task', 'integration test task',
|
|
335
|
-
'--timeout', '5000'
|
|
336
|
-
], {
|
|
337
|
-
stdio: 'pipe',
|
|
338
|
-
cwd: '/home/vitruvius/git/fleettools/server/api'
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
let output = '';
|
|
342
|
-
runnerProcess.stdout?.on('data', (data) => {
|
|
343
|
-
output += data.toString();
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
// Wait for process to complete or timeout
|
|
347
|
-
const result = await new Promise<{ code: number | null; output: string }>((resolve) => {
|
|
348
|
-
runnerProcess.on('close', (code) => {
|
|
349
|
-
resolve({ code, output });
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
setTimeout(() => {
|
|
353
|
-
runnerProcess.kill();
|
|
354
|
-
resolve({ code: -1, output });
|
|
355
|
-
}, 8000);
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
// Process should either complete successfully or timeout (both are acceptable for this test)
|
|
359
|
-
expect(result.code === null ? -1 : result.code).toBeOneOf([0, 1, -1]);
|
|
360
|
-
expect(result.output).toContain(agentId);
|
|
361
|
-
expect(result.output.length).toBeGreaterThan(0);
|
|
362
|
-
});
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
describe('End-to-End Workflow', () => {
|
|
366
|
-
it('should complete spawn → execute → checkpoint → resume workflow', async () => {
|
|
367
|
-
// 1. Spawn agent
|
|
368
|
-
const spawnRequest: AgentSpawnRequest = {
|
|
369
|
-
type: 'documentation',
|
|
370
|
-
task: 'Generate integration test documentation',
|
|
371
|
-
config: { timeout: 15000 }
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
const spawnResponse = await fetch(`${API_BASE}/api/v1/agents/spawn`, {
|
|
375
|
-
method: 'POST',
|
|
376
|
-
headers: { 'Content-Type': 'application/json' },
|
|
377
|
-
body: JSON.stringify(spawnRequest)
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
expect(spawnResponse.ok).toBe(true);
|
|
381
|
-
const spawnData = await spawnResponse.json();
|
|
382
|
-
const agentId = spawnData.data.id;
|
|
383
|
-
agentIds.push(agentId);
|
|
384
|
-
|
|
385
|
-
// Wait for agent to start
|
|
386
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
387
|
-
|
|
388
|
-
// 2. Create checkpoint
|
|
389
|
-
const missionId = `msn-e2e-${randomUUID()}`;
|
|
390
|
-
const checkpointRequest = {
|
|
391
|
-
mission_id: missionId,
|
|
392
|
-
trigger: 'manual',
|
|
393
|
-
trigger_details: 'E2E integration test',
|
|
394
|
-
progress_percent: 25,
|
|
395
|
-
sorties: [
|
|
396
|
-
{
|
|
397
|
-
id: `srt-${agentId}`,
|
|
398
|
-
status: 'in_progress',
|
|
399
|
-
assigned_to: agentId,
|
|
400
|
-
progress: 25
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
|
-
active_locks: [],
|
|
404
|
-
pending_messages: [],
|
|
405
|
-
recovery_context: {
|
|
406
|
-
last_action: 'agent_spawned',
|
|
407
|
-
next_steps: ['continue documentation work'],
|
|
408
|
-
blockers: [],
|
|
409
|
-
files_modified: [],
|
|
410
|
-
mission_summary: `E2E test with agent ${agentId}`,
|
|
411
|
-
elapsed_time_ms: 5000,
|
|
412
|
-
last_activity_at: new Date().toISOString()
|
|
413
|
-
},
|
|
414
|
-
created_by: 'e2e-test',
|
|
415
|
-
version: '1.0.0'
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
const checkpointResponse = await fetch(`${API_BASE}/api/v1/checkpoints`, {
|
|
419
|
-
method: 'POST',
|
|
420
|
-
headers: { 'Content-Type': 'application/json' },
|
|
421
|
-
body: JSON.stringify(checkpointRequest)
|
|
422
|
-
});
|
|
423
|
-
|
|
424
|
-
expect(checkpointResponse.ok).toBe(true);
|
|
425
|
-
const checkpointData = await checkpointResponse.json();
|
|
426
|
-
const checkpointId = checkpointData.data.id;
|
|
427
|
-
|
|
428
|
-
// 3. Verify checkpoint exists
|
|
429
|
-
const verifyResponse = await fetch(`${API_BASE}/api/v1/checkpoints/${checkpointId}`);
|
|
430
|
-
expect(verifyResponse.ok).toBe(true);
|
|
431
|
-
const verifyData = await verifyResponse.json();
|
|
432
|
-
expect(verifyData.data.id).toBe(checkpointId);
|
|
433
|
-
|
|
434
|
-
// 4. Attempt resume (dry run)
|
|
435
|
-
const resumeResponse = await fetch(`${API_BASE}/api/v1/checkpoints/${checkpointId}/resume`, {
|
|
436
|
-
method: 'POST',
|
|
437
|
-
headers: { 'Content-Type': 'application/json' },
|
|
438
|
-
body: JSON.stringify({
|
|
439
|
-
force: false,
|
|
440
|
-
dryRun: true
|
|
441
|
-
})
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
// Resume should work or at least provide meaningful error
|
|
445
|
-
expect([200, 207, 400, 500]).toContain(resumeResponse.status);
|
|
446
|
-
|
|
447
|
-
if (resumeResponse.ok) {
|
|
448
|
-
const resumeData = await resumeResponse.json();
|
|
449
|
-
expect(resumeData.success).toBeDefined();
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
console.log(`✓ E2E workflow completed for agent ${spawnData.data.agent.id}, checkpoint ${checkpointId}`);
|
|
453
|
-
}, 30000); // 30 second timeout for E2E test
|
|
454
|
-
});
|
|
455
|
-
});
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simple Test for Enhanced Agent Features
|
|
3
|
-
* Quick verification of Phase 2 implementation
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, it, expect } from 'bun:test';
|
|
7
|
-
|
|
8
|
-
describe('Phase 2 Enhanced Agent Features', () => {
|
|
9
|
-
|
|
10
|
-
it('should have enhanced agent task execution capabilities', async () => {
|
|
11
|
-
// Test that agent-runner.js has been enhanced with real task execution
|
|
12
|
-
const { readFile } = await import('node:fs/promises');
|
|
13
|
-
const agentRunnerContent = await readFile('./src/agent-runner.js', 'utf-8');
|
|
14
|
-
|
|
15
|
-
// Check for real task execution methods
|
|
16
|
-
expect(agentRunnerContent).toContain('parseTask');
|
|
17
|
-
expect(agentRunnerContent).toContain('analyzeCodebase');
|
|
18
|
-
expect(agentRunnerContent).toContain('implementFrontendChanges');
|
|
19
|
-
expect(agentRunnerContent).toContain('runFrontendTests');
|
|
20
|
-
expect(agentRunnerContent).toContain('verifyBuild');
|
|
21
|
-
|
|
22
|
-
// Check for progress tracking integration
|
|
23
|
-
expect(agentRunnerContent).toContain('task_progress');
|
|
24
|
-
expect(agentRunnerContent).toContain('stage: \'analysis\'');
|
|
25
|
-
expect(agentRunnerContent).toContain('stage: \'implementation\'');
|
|
26
|
-
expect(agentRunnerContent).toContain('stage: \'testing\'');
|
|
27
|
-
expect(agentRunnerContent).toContain('stage: \'verification\'');
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should have enhanced agent spawner with resource monitoring', async () => {
|
|
31
|
-
const { readFile } = await import('node:fs/promises');
|
|
32
|
-
const spawnerContent = await readFile('./src/coordination/agent-spawner.ts', 'utf-8');
|
|
33
|
-
|
|
34
|
-
// Check for real resource monitoring
|
|
35
|
-
expect(spawnerContent).toContain('getLinuxProcessUsage');
|
|
36
|
-
expect(spawnerContent).toContain('getMacOSProcessUsage');
|
|
37
|
-
expect(spawnerContent).toContain('storeResourceHistory');
|
|
38
|
-
expect(spawnerContent).toContain('getResourceTrends');
|
|
39
|
-
|
|
40
|
-
// Check for heartbeat monitoring and recovery
|
|
41
|
-
expect(spawnerContent).toContain('startHeartbeatMonitoring');
|
|
42
|
-
expect(spawnerContent).toContain('startRecoveryMonitoring');
|
|
43
|
-
expect(spawnerContent).toContain('attemptAgentRecovery');
|
|
44
|
-
expect(spawnerContent).toContain('heartbeatTimeout');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('should have enhanced CLI commands', async () => {
|
|
48
|
-
const { readFile } = await import('node:fs/promises');
|
|
49
|
-
const cliContent = await readFile('../../cli/src/commands/agents.ts', 'utf-8');
|
|
50
|
-
|
|
51
|
-
// Check for new CLI commands
|
|
52
|
-
expect(cliContent).toContain('healthCommand');
|
|
53
|
-
expect(cliContent).toContain('resourcesCommand');
|
|
54
|
-
expect(cliContent).toContain('logsCommand');
|
|
55
|
-
|
|
56
|
-
// Check for enhanced monitoring options
|
|
57
|
-
expect(cliContent).toContain('--watch');
|
|
58
|
-
expect(cliContent).toContain('--history');
|
|
59
|
-
expect(cliContent).toContain('--trends');
|
|
60
|
-
expect(cliContent).toContain('--follow');
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it('should have enhanced API endpoints', async () => {
|
|
64
|
-
const { readFile } = await import('node:fs/promises');
|
|
65
|
-
const agentsApiContent = await readFile('./src/coordination/agents.ts', 'utf-8');
|
|
66
|
-
|
|
67
|
-
// Check for new API endpoints
|
|
68
|
-
expect(agentsApiContent).toContain('/agents/:id/health');
|
|
69
|
-
expect(agentsApiContent).toContain('/agents/system-health');
|
|
70
|
-
expect(agentsApiContent).toContain('/agents/:id/resource-history');
|
|
71
|
-
expect(agentsApiContent).toContain('/agents/:id/resource-trends');
|
|
72
|
-
expect(agentsApiContent).toContain('/agents/:id/logs');
|
|
73
|
-
|
|
74
|
-
// Check for health monitoring integration
|
|
75
|
-
expect(agentsApiContent).toContain('getAgentHealth');
|
|
76
|
-
expect(agentsApiContent).toContain('getSystemHealth');
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('should have agent specialization support', async () => {
|
|
80
|
-
const { readFile } = await import('node:fs/promises');
|
|
81
|
-
const agentRunnerContent = await readFile('./src/agent-runner.js', 'utf-8');
|
|
82
|
-
|
|
83
|
-
// Check for all six agent types
|
|
84
|
-
expect(agentRunnerContent).toContain('executeFrontendTask');
|
|
85
|
-
expect(agentRunnerContent).toContain('executeBackendTask');
|
|
86
|
-
expect(agentRunnerContent).toContain('executeTestingTask');
|
|
87
|
-
expect(agentRunnerContent).toContain('executeDocumentationTask');
|
|
88
|
-
expect(agentRunnerContent).toContain('executeSecurityTask');
|
|
89
|
-
expect(agentRunnerContent).toContain('executePerformanceTask');
|
|
90
|
-
|
|
91
|
-
// Check for specialized task execution
|
|
92
|
-
expect(agentRunnerContent).toContain('analyzeTestCoverage');
|
|
93
|
-
expect(agentRunnerContent).toContain('measureBaselinePerformance');
|
|
94
|
-
expect(agentRunnerContent).toContain('identifyBottlenecks');
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('should have comprehensive progress tracking', async () => {
|
|
98
|
-
const { readFile } = await import('node:fs/promises');
|
|
99
|
-
const progressContent = await readFile('./src/coordination/progress-tracker.ts', 'utf-8');
|
|
100
|
-
|
|
101
|
-
// Check for database persistence
|
|
102
|
-
expect(progressContent).toContain('CREATE TABLE IF NOT EXISTS missions');
|
|
103
|
-
expect(progressContent).toContain('CREATE TABLE IF NOT EXISTS progress_updates');
|
|
104
|
-
|
|
105
|
-
// Check for progress calculation methods
|
|
106
|
-
expect(progressContent).toContain('recalculateMissionProgress');
|
|
107
|
-
expect(progressContent).toContain('getProgressHistory');
|
|
108
|
-
expect(progressContent).toContain('getProgressMetrics');
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('should have proper error handling and recovery', async () => {
|
|
112
|
-
const { readFile } = await import('node:fs/promises');
|
|
113
|
-
const spawnerContent = await readFile('./src/coordination/agent-spawner.ts', 'utf-8');
|
|
114
|
-
|
|
115
|
-
// Check for error handling patterns
|
|
116
|
-
expect(spawnerContent).toContain('handleMissedHeartbeat');
|
|
117
|
-
expect(spawnerContent).toContain('performRecoveryChecks');
|
|
118
|
-
expect(spawnerContent).toContain('sendRecoveryEvent');
|
|
119
|
-
expect(spawnerContent).toContain('recoveryAttempts > 3');
|
|
120
|
-
|
|
121
|
-
// Check for graceful shutdown
|
|
122
|
-
expect(spawnerContent).toContain('cleanup');
|
|
123
|
-
expect(spawnerContent).toContain('clearInterval');
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
console.log('✅ Phase 2 Enhanced Agent Features test structure verified');
|
|
128
|
-
console.log('📋 Implementation includes:');
|
|
129
|
-
console.log(' - Real task execution for 6 agent types');
|
|
130
|
-
console.log(' - Comprehensive progress tracking');
|
|
131
|
-
console.log(' - Heartbeat monitoring and automatic recovery');
|
|
132
|
-
console.log(' - Cross-platform resource monitoring');
|
|
133
|
-
console.log(' - Enhanced CLI with monitoring commands');
|
|
134
|
-
console.log(' - New API endpoints for health and resources');
|
|
135
|
-
console.log(' - Proper error handling and resilience');
|
package/server.log
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
[Database] Project root: /home/vitruvius/git/fleettools
|
|
2
|
-
[Database] Schema path: /home/vitruvius/git/fleettools/squawk/src/db/schema.sql
|
|
3
|
-
[Database] Schema exists: true
|
|
4
|
-
SQLite database initialized: /home/vitruvius/.local/share/fleet/squawk.db
|
|
5
|
-
[Migration] Starting migration from: /home/vitruvius/.local/share/fleet/squawk.json
|
|
6
|
-
[Migration] Complete:
|
|
7
|
-
- Mailboxes: 0
|
|
8
|
-
- Events: 0
|
|
9
|
-
- Cursors: 0
|
|
10
|
-
- Locks: 0
|
|
11
|
-
Squawk database initialized
|
|
12
|
-
✓ ProgressTracker database initialized
|
|
13
|
-
✓ Mission management routes registered
|
|
14
|
-
FleetTools Consolidated API server listening on port 3001
|
|
15
|
-
Health check: http://localhost:3001/health
|
|
16
|
-
|
|
17
|
-
Flightline Endpoints:
|
|
18
|
-
GET /api/v1/work-orders - List work orders
|
|
19
|
-
POST /api/v1/work-orders - Create work order
|
|
20
|
-
GET /api/v1/work-orders/:id - Get work order
|
|
21
|
-
PATCH /api/v1/work-orders/:id - Update work order
|
|
22
|
-
DELETE /api/v1/work-orders/:id - Delete work order
|
|
23
|
-
GET /api/v1/ctk/reservations - List CTK reservations
|
|
24
|
-
POST /api/v1/ctk/reserve - Reserve file
|
|
25
|
-
POST /api/v1/ctk/release - Release reservation
|
|
26
|
-
GET /api/v1/tech-orders - List tech orders
|
|
27
|
-
POST /api/v1/tech-orders - Create tech order
|
|
28
|
-
|
|
29
|
-
Squawk Endpoints:
|
|
30
|
-
POST /api/v1/mailbox/append - Append events to mailbox
|
|
31
|
-
GET /api/v1/mailbox/:streamId - Get mailbox contents
|
|
32
|
-
POST /api/v1/cursor/advance - Advance cursor position
|
|
33
|
-
GET /api/v1/cursor/:cursorId - Get cursor position
|
|
34
|
-
POST /api/v1/lock/acquire - Acquire file lock
|
|
35
|
-
POST /api/v1/lock/release - Release file lock
|
|
36
|
-
GET /api/v1/locks - List all active locks
|
|
37
|
-
GET /api/v1/coordinator/status - Get coordinator status
|
|
38
|
-
332 | append: async (streamId: string, events: any[]) => {
|
|
39
|
-
333 | const adapter = getAdapter() as any;
|
|
40
|
-
334 | const now = new Date().toISOString();
|
|
41
|
-
335 |
|
|
42
|
-
336 | for (const event of events) {
|
|
43
|
-
337 | await adapter.events.create({
|
|
44
|
-
^
|
|
45
|
-
TypeError: adapter.events.create is not a function. (In 'adapter.events.create({
|
|
46
|
-
id: randomUUID(),
|
|
47
|
-
stream_id: streamId,
|
|
48
|
-
type: event.type,
|
|
49
|
-
data: JSON.stringify(event.data),
|
|
50
|
-
occurred_at: now,
|
|
51
|
-
metadata: JSON.stringify(event.metadata || {})
|
|
52
|
-
})', 'adapter.events.create' is undefined)
|
|
53
|
-
at <anonymous> (/home/vitruvius/git/fleettools/squawk/src/db/index.ts:337:28)
|
|
54
|
-
at append (/home/vitruvius/git/fleettools/squawk/src/db/index.ts:332:18)
|
|
55
|
-
at <anonymous> (/home/vitruvius/git/fleettools/server/api/src/squawk/mailbox.ts:31:33)
|
|
56
|
-
at async fetch (/home/vitruvius/git/fleettools/server/api/src/index.ts:143:32)
|
|
57
|
-
|
|
58
|
-
Bun v1.3.5 (Linux x64)
|