@kb-labs/rest-api-app 1.3.0 → 1.4.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8151 -0
- package/dist/index.js.map +1 -0
- package/package.json +7 -4
- package/.kb/agents/sessions/session-1771531145393-ws3uh6q/turns.json +0 -42
- package/.kb/agents/sessions/session-1771548930486-ui6rtvm/turns.json +0 -33
- package/.kb/agents/sessions/session-1771549691485-nibqroq/turns.json +0 -133
- package/.kb/agents/sessions/session-1771550943182-dkwqdjc/turns.json +0 -130
- package/.kb/agents/sessions/session-1771551564182-cr4bwzn/turns.json +0 -349
- package/.kb/agents/sessions/session-1771552401370-g4ztwd1/turns.json +0 -206
- package/.kb/commit/current/plan.json +0 -248
- package/.kb/commit/current/status.json +0 -472
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.js +0 -215
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.js +0 -271
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.js +0 -230
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.js +0 -228
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.js +0 -281
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.js +0 -266
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.js +0 -284
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/flags-WLdpSZl4.d.ts +0 -77
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.d.ts +0 -2
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.js +0 -441
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.d.ts +0 -196
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.js +0 -441
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.d.ts +0 -19
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.js +0 -48
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.d.ts +0 -6
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.js +0 -170
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.d.ts +0 -12
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.d.ts +0 -22
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.js +0 -43
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.d.ts +0 -26
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.js +0 -63
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.d.ts +0 -16
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.js +0 -58
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.js +0 -50
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.d.ts +0 -7
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.js +0 -39
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.js +0 -47
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.d.ts +0 -14
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.js +0 -53
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.js +0 -54
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.d.ts +0 -12
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.js +0 -51
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.d.ts +0 -17
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.js +0 -133
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.js.map +0 -1
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.js +0 -46
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.js +0 -215
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.js +0 -271
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.js +0 -230
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.js +0 -228
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.js +0 -281
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.js +0 -266
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.js +0 -284
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/flags-WLdpSZl4.d.ts +0 -77
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.d.ts +0 -2
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.js +0 -441
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.d.ts +0 -196
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.js +0 -441
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.d.ts +0 -19
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.js +0 -48
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.d.ts +0 -6
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.js +0 -170
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.d.ts +0 -12
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.d.ts +0 -22
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.js +0 -52
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.js +0 -43
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.d.ts +0 -26
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.js +0 -63
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.d.ts +0 -16
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.js +0 -58
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.d.ts +0 -9
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.js +0 -50
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.d.ts +0 -7
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.js +0 -39
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.d.ts +0 -10
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.js +0 -46
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.js +0 -47
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.d.ts +0 -14
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.js +0 -53
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.d.ts +0 -13
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.js +0 -54
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.d.ts +0 -12
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.js +0 -51
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.d.ts +0 -17
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.js +0 -133
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.js.map +0 -1
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.d.ts +0 -11
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.js +0 -46
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.js.map +0 -1
- package/eslint.config.js +0 -23
- package/src/.kb/agents/sessions/session-1773470583796-ximqnfk/kpi-baseline.json +0 -17
- package/src/.kb/memory/sessions/session-1773470583796-ximqnfk/fact-sheet.json +0 -1
- package/src/bootstrap.ts +0 -233
- package/src/diagnostics/header-debug.ts +0 -37
- package/src/events/hub.ts +0 -60
- package/src/events/index.ts +0 -1
- package/src/index.ts +0 -13
- package/src/manifest.ts +0 -21
- package/src/middleware/__tests__/cache.spec.ts +0 -184
- package/src/middleware/__tests__/envelope.spec.ts +0 -268
- package/src/middleware/__tests__/metrics.redis.spec.ts +0 -64
- package/src/middleware/__tests__/rate-limit.spec.ts +0 -283
- package/src/middleware/__tests__/request-id.spec.ts +0 -160
- package/src/middleware/cache.ts +0 -67
- package/src/middleware/envelope.ts +0 -136
- package/src/middleware/error-guard.ts +0 -69
- package/src/middleware/index.ts +0 -37
- package/src/middleware/metrics.ts +0 -810
- package/src/middleware/mock-mode.ts +0 -44
- package/src/middleware/prom-metrics.ts +0 -284
- package/src/middleware/rate-limit-routes.ts +0 -73
- package/src/middleware/rate-limit.ts +0 -72
- package/src/middleware/request-id.ts +0 -41
- package/src/middleware/request-timeout.ts +0 -69
- package/src/middleware/security-headers.ts +0 -24
- package/src/middleware/startup-guard.ts +0 -107
- package/src/observability/service-contract.ts +0 -192
- package/src/plugins/index.ts +0 -118
- package/src/routes/__tests__/adapters-date-helpers.spec.ts +0 -332
- package/src/routes/__tests__/adapters.spec.ts +0 -680
- package/src/routes/__tests__/cache.spec.ts +0 -264
- package/src/routes/__tests__/events.spec.ts +0 -434
- package/src/routes/__tests__/health.spec.ts +0 -414
- package/src/routes/__tests__/logs.spec.ts +0 -494
- package/src/routes/__tests__/observability.spec.ts +0 -392
- package/src/routes/__tests__/plugins.spec.ts +0 -931
- package/src/routes/__tests__/workflow-management.spec.ts +0 -698
- package/src/routes/__tests__/workflows.spec.ts +0 -204
- package/src/routes/adapter-call.ts +0 -220
- package/src/routes/adapters.ts +0 -1206
- package/src/routes/analytics.ts +0 -328
- package/src/routes/cache.ts +0 -104
- package/src/routes/debug-routes.ts +0 -95
- package/src/routes/events.ts +0 -115
- package/src/routes/health.ts +0 -348
- package/src/routes/hello.ts +0 -47
- package/src/routes/index.ts +0 -395
- package/src/routes/jobs.ts +0 -253
- package/src/routes/logs.ts +0 -718
- package/src/routes/metrics.ts +0 -120
- package/src/routes/observability.ts +0 -1388
- package/src/routes/openapi.ts +0 -101
- package/src/routes/platform.ts +0 -143
- package/src/routes/plugins.ts +0 -998
- package/src/routes/readiness.ts +0 -83
- package/src/routes/workflow-management.ts +0 -469
- package/src/routes/workflows.ts +0 -256
- package/src/server.ts +0 -203
- package/src/services/historical-metrics.ts +0 -496
- package/src/services/incident-analyzer.ts +0 -289
- package/src/services/incident-detector.ts +0 -691
- package/src/services/incident-schema.sql +0 -76
- package/src/services/incident-storage.ts +0 -593
- package/src/services/system-metrics-collector.ts +0 -244
- package/src/types/fastify.d.ts +0 -58
- package/src/utils/__tests__/sse-auth.spec.ts +0 -113
- package/src/utils/path-helpers.ts +0 -15
- package/src/utils/repo.ts +0 -42
- package/src/utils/schema.ts +0 -20
- package/src/utils/sse-auth.ts +0 -81
- package/test-sandbox.sh +0 -105
- package/tsconfig.build.json +0 -15
- package/tsconfig.json +0 -9
- package/tsup.config.ts +0 -18
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module @kb-labs/rest-api-app/services/incident-analyzer
|
|
3
|
-
* AI-powered incident analysis using LLM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { Incident } from './incident-storage';
|
|
7
|
-
import { platform } from '@kb-labs/core-runtime';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* AI analysis result structure
|
|
11
|
-
*/
|
|
12
|
-
export interface IncidentAnalysis {
|
|
13
|
-
/** Executive summary of the incident */
|
|
14
|
-
summary: string;
|
|
15
|
-
/** Identified root causes with confidence scores */
|
|
16
|
-
rootCauses: Array<{
|
|
17
|
-
factor: string;
|
|
18
|
-
confidence: number;
|
|
19
|
-
evidence: string;
|
|
20
|
-
}>;
|
|
21
|
-
/** Detected patterns or trends */
|
|
22
|
-
patterns: string[];
|
|
23
|
-
/** Actionable recommendations */
|
|
24
|
-
recommendations: string[];
|
|
25
|
-
/** Analysis timestamp */
|
|
26
|
-
analyzedAt: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Incident analyzer configuration
|
|
31
|
-
*/
|
|
32
|
-
export interface IncidentAnalyzerConfig {
|
|
33
|
-
/** LLM model to use (default: gpt-4) */
|
|
34
|
-
model?: string;
|
|
35
|
-
/** Temperature for generation (default: 0.3 for consistency) */
|
|
36
|
-
temperature?: number;
|
|
37
|
-
/** Max tokens for response (default: 1500) */
|
|
38
|
-
maxTokens?: number;
|
|
39
|
-
/** Enable debug logging */
|
|
40
|
-
debug?: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const DEFAULT_CONFIG: Required<IncidentAnalyzerConfig> = {
|
|
44
|
-
model: 'gpt-4',
|
|
45
|
-
temperature: 0.3,
|
|
46
|
-
maxTokens: 1500,
|
|
47
|
-
debug: false,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* AI-powered incident analyzer
|
|
52
|
-
*
|
|
53
|
-
* Analyzes incidents using LLM to:
|
|
54
|
-
* - Identify root causes from logs and metrics
|
|
55
|
-
* - Detect patterns across timeline
|
|
56
|
-
* - Generate actionable recommendations
|
|
57
|
-
*/
|
|
58
|
-
export class IncidentAnalyzer {
|
|
59
|
-
private config: Required<IncidentAnalyzerConfig>;
|
|
60
|
-
private logger: Console | any;
|
|
61
|
-
|
|
62
|
-
constructor(
|
|
63
|
-
config: IncidentAnalyzerConfig = {},
|
|
64
|
-
logger: Console | any = console
|
|
65
|
-
) {
|
|
66
|
-
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
67
|
-
this.logger = logger;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Analyze incident using LLM
|
|
72
|
-
*
|
|
73
|
-
* @param incident - Incident to analyze
|
|
74
|
-
* @returns AI analysis result
|
|
75
|
-
*/
|
|
76
|
-
async analyze(incident: Incident): Promise<IncidentAnalysis> {
|
|
77
|
-
this.log('info', 'Analyzing incident', { id: incident.id, type: incident.type });
|
|
78
|
-
|
|
79
|
-
// Build prompt from incident data
|
|
80
|
-
const prompt = this.buildAnalysisPrompt(incident);
|
|
81
|
-
|
|
82
|
-
try {
|
|
83
|
-
// Call LLM
|
|
84
|
-
const result = await platform.llm.complete(prompt, {
|
|
85
|
-
model: this.config.model,
|
|
86
|
-
temperature: this.config.temperature,
|
|
87
|
-
maxTokens: this.config.maxTokens,
|
|
88
|
-
systemPrompt: this.getSystemPrompt(),
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
this.log('debug', 'LLM response received', {
|
|
92
|
-
length: result.content.length,
|
|
93
|
-
tokensUsed: result.usage ? (result.usage.promptTokens + result.usage.completionTokens) : undefined,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// Parse LLM response
|
|
97
|
-
const analysis = this.parseAnalysisResponse(result.content);
|
|
98
|
-
|
|
99
|
-
this.log('info', 'Incident analysis complete', {
|
|
100
|
-
id: incident.id,
|
|
101
|
-
rootCausesCount: analysis.rootCauses.length,
|
|
102
|
-
recommendationsCount: analysis.recommendations.length,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
return analysis;
|
|
106
|
-
} catch (error) {
|
|
107
|
-
this.log('error', 'Incident analysis failed', {
|
|
108
|
-
id: incident.id,
|
|
109
|
-
error: error instanceof Error ? error.message : String(error),
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Return fallback analysis
|
|
113
|
-
return this.getFallbackAnalysis(incident);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Build analysis prompt from incident data
|
|
119
|
-
* @private
|
|
120
|
-
*/
|
|
121
|
-
private buildAnalysisPrompt(incident: Incident): string {
|
|
122
|
-
let prompt = `# Incident Analysis Request\n\n`;
|
|
123
|
-
prompt += `## Incident Overview\n`;
|
|
124
|
-
prompt += `- **ID**: ${incident.id}\n`;
|
|
125
|
-
prompt += `- **Type**: ${incident.type}\n`;
|
|
126
|
-
prompt += `- **Severity**: ${incident.severity}\n`;
|
|
127
|
-
prompt += `- **Title**: ${incident.title}\n`;
|
|
128
|
-
prompt += `- **Time**: ${new Date(incident.timestamp).toISOString()}\n\n`;
|
|
129
|
-
|
|
130
|
-
prompt += `## Description\n${incident.details}\n\n`;
|
|
131
|
-
|
|
132
|
-
// Add metadata
|
|
133
|
-
if (incident.metadata && Object.keys(incident.metadata).length > 0) {
|
|
134
|
-
prompt += `## Metrics\n`;
|
|
135
|
-
prompt += '```json\n';
|
|
136
|
-
prompt += JSON.stringify(incident.metadata, null, 2);
|
|
137
|
-
prompt += '\n```\n\n';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Add related logs
|
|
141
|
-
if (incident.relatedData?.logs && incident.relatedData.logs.sampleErrors.length > 0) {
|
|
142
|
-
prompt += `## Related Error Logs (${incident.relatedData.logs.errorCount} total)\n`;
|
|
143
|
-
incident.relatedData.logs.sampleErrors.forEach((error, idx) => {
|
|
144
|
-
prompt += `${idx + 1}. ${error}\n`;
|
|
145
|
-
});
|
|
146
|
-
prompt += '\n';
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Add timeline
|
|
150
|
-
if (incident.relatedData?.timeline && incident.relatedData.timeline.length > 0) {
|
|
151
|
-
prompt += `## Event Timeline\n`;
|
|
152
|
-
incident.relatedData.timeline.slice(0, 10).forEach(event => {
|
|
153
|
-
const time = new Date(event.timestamp).toISOString();
|
|
154
|
-
prompt += `- [${time}] (${event.source}) ${event.event}\n`;
|
|
155
|
-
});
|
|
156
|
-
prompt += '\n';
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Add related metrics
|
|
160
|
-
if (incident.relatedData?.metrics) {
|
|
161
|
-
prompt += `## System Metrics\n`;
|
|
162
|
-
prompt += '```json\n';
|
|
163
|
-
prompt += JSON.stringify(incident.relatedData.metrics, null, 2);
|
|
164
|
-
prompt += '\n```\n\n';
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
prompt += `## Analysis Instructions\n`;
|
|
168
|
-
prompt += `Please analyze this incident and provide:\n`;
|
|
169
|
-
prompt += `1. A brief executive summary (2-3 sentences)\n`;
|
|
170
|
-
prompt += `2. Root causes with confidence scores (0.0-1.0) and evidence\n`;
|
|
171
|
-
prompt += `3. Patterns or trends you observe\n`;
|
|
172
|
-
prompt += `4. Actionable recommendations for resolution and prevention\n\n`;
|
|
173
|
-
|
|
174
|
-
prompt += `Format your response as JSON:\n`;
|
|
175
|
-
prompt += '```json\n';
|
|
176
|
-
prompt += `{\n`;
|
|
177
|
-
prompt += ` "summary": "Executive summary here",\n`;
|
|
178
|
-
prompt += ` "rootCauses": [\n`;
|
|
179
|
-
prompt += ` {\n`;
|
|
180
|
-
prompt += ` "factor": "Root cause description",\n`;
|
|
181
|
-
prompt += ` "confidence": 0.85,\n`;
|
|
182
|
-
prompt += ` "evidence": "Supporting evidence from logs/metrics"\n`;
|
|
183
|
-
prompt += ` }\n`;
|
|
184
|
-
prompt += ` ],\n`;
|
|
185
|
-
prompt += ` "patterns": ["Pattern 1", "Pattern 2"],\n`;
|
|
186
|
-
prompt += ` "recommendations": ["Recommendation 1", "Recommendation 2"]\n`;
|
|
187
|
-
prompt += `}\n`;
|
|
188
|
-
prompt += '```';
|
|
189
|
-
|
|
190
|
-
return prompt;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Get system prompt for incident analysis
|
|
195
|
-
* @private
|
|
196
|
-
*/
|
|
197
|
-
private getSystemPrompt(): string {
|
|
198
|
-
return `You are an expert SRE (Site Reliability Engineer) and incident response specialist.
|
|
199
|
-
Your role is to analyze system incidents, identify root causes, and provide actionable recommendations.
|
|
200
|
-
|
|
201
|
-
Guidelines:
|
|
202
|
-
- Base your analysis on the actual data provided (logs, metrics, timeline)
|
|
203
|
-
- Provide confidence scores based on available evidence (0.0 = no evidence, 1.0 = certain)
|
|
204
|
-
- Focus on actionable recommendations that can prevent future incidents
|
|
205
|
-
- Be concise but thorough - this is for production systems
|
|
206
|
-
- Always respond with valid JSON matching the requested format`;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Parse LLM response into structured analysis
|
|
211
|
-
* @private
|
|
212
|
-
*/
|
|
213
|
-
private parseAnalysisResponse(response: string): IncidentAnalysis {
|
|
214
|
-
try {
|
|
215
|
-
// Extract JSON from response (handle markdown code blocks)
|
|
216
|
-
const jsonMatch = response.match(/```json\s*([\s\S]*?)\s*```/)
|
|
217
|
-
?? response.match(/```\s*([\s\S]*?)\s*```/)
|
|
218
|
-
?? [null, response];
|
|
219
|
-
|
|
220
|
-
const jsonStr = jsonMatch[1] || response;
|
|
221
|
-
const parsed = JSON.parse(jsonStr.trim());
|
|
222
|
-
|
|
223
|
-
return {
|
|
224
|
-
summary: parsed.summary || 'No summary provided',
|
|
225
|
-
rootCauses: Array.isArray(parsed.rootCauses) ? parsed.rootCauses : [],
|
|
226
|
-
patterns: Array.isArray(parsed.patterns) ? parsed.patterns : [],
|
|
227
|
-
recommendations: Array.isArray(parsed.recommendations) ? parsed.recommendations : [],
|
|
228
|
-
analyzedAt: Date.now(),
|
|
229
|
-
};
|
|
230
|
-
} catch (error) {
|
|
231
|
-
this.log('warn', 'Failed to parse LLM response, using fallback', {
|
|
232
|
-
error: error instanceof Error ? error.message : String(error),
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// Try to extract meaningful text even if JSON parsing fails
|
|
236
|
-
return {
|
|
237
|
-
summary: response.substring(0, 200),
|
|
238
|
-
rootCauses: [],
|
|
239
|
-
patterns: [],
|
|
240
|
-
recommendations: [],
|
|
241
|
-
analyzedAt: Date.now(),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Get fallback analysis when LLM is unavailable
|
|
248
|
-
* @private
|
|
249
|
-
*/
|
|
250
|
-
private getFallbackAnalysis(incident: Incident): IncidentAnalysis {
|
|
251
|
-
const errorCount = incident.relatedData?.logs?.errorCount ?? 0;
|
|
252
|
-
const sampleErrors = incident.relatedData?.logs?.sampleErrors ?? [];
|
|
253
|
-
|
|
254
|
-
return {
|
|
255
|
-
summary: `${incident.severity} ${incident.type} incident detected. ${errorCount} errors logged.`,
|
|
256
|
-
rootCauses: [
|
|
257
|
-
{
|
|
258
|
-
factor: incident.title,
|
|
259
|
-
confidence: 0.5,
|
|
260
|
-
evidence: incident.details,
|
|
261
|
-
},
|
|
262
|
-
],
|
|
263
|
-
patterns: sampleErrors.length > 0
|
|
264
|
-
? [`Multiple error types detected: ${sampleErrors.length} unique errors`]
|
|
265
|
-
: [],
|
|
266
|
-
recommendations: [
|
|
267
|
-
'Review related error logs for stack traces',
|
|
268
|
-
'Check system metrics during incident timeframe',
|
|
269
|
-
'Verify external dependencies are operational',
|
|
270
|
-
],
|
|
271
|
-
analyzedAt: Date.now(),
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
private log(level: 'info' | 'warn' | 'error' | 'debug', message: string, meta?: any): void {
|
|
276
|
-
if (level === 'debug' && !this.config.debug) {return;}
|
|
277
|
-
|
|
278
|
-
const prefix = '[IncidentAnalyzer]';
|
|
279
|
-
if (this.logger[level]) {
|
|
280
|
-
if (meta) {
|
|
281
|
-
this.logger[level]({ ...meta }, `${prefix} ${message}`);
|
|
282
|
-
} else {
|
|
283
|
-
this.logger[level](`${prefix} ${message}`);
|
|
284
|
-
}
|
|
285
|
-
} else {
|
|
286
|
-
console.log(`${prefix} [${level}] ${message}`, meta ?? '');
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|