@kb-labs/rest-api-app 1.3.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/.kb/agents/sessions/session-1771531145393-ws3uh6q/turns.json +42 -0
- package/.kb/agents/sessions/session-1771548930486-ui6rtvm/turns.json +33 -0
- package/.kb/agents/sessions/session-1771549691485-nibqroq/turns.json +133 -0
- package/.kb/agents/sessions/session-1771550943182-dkwqdjc/turns.json +130 -0
- package/.kb/agents/sessions/session-1771551564182-cr4bwzn/turns.json +349 -0
- package/.kb/agents/sessions/session-1771552401370-g4ztwd1/turns.json +206 -0
- package/.kb/commit/current/plan.json +248 -0
- package/.kb/commit/current/status.json +472 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.js +215 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/health.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.js +271 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/list.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.js +230 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/logs.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.js +228 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/metrics.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.js +281 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/run.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.js +266 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/status.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.js +284 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/commands/workflow-run.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/flags-WLdpSZl4.d.ts +77 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.d.ts +2 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.js +441 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/index.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.d.ts +196 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.js +441 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/manifest.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.d.ts +19 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.js +48 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/cron-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.d.ts +6 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.js +170 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/index.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.d.ts +12 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-cancel-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.d.ts +22 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-logs-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.js +43 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/job-steps-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.d.ts +26 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.js +63 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/jobs-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/pending-approvals-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.d.ts +16 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.js +58 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/resolve-approval-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/run-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.js +50 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/runs-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.d.ts +7 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.js +39 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/stats-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.js +47 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-cancel-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.d.ts +14 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.js +53 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-run-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.js +54 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflow-runs-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.d.ts +12 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.js +51 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/rest/workflows-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.d.ts +17 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.js +133 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/logs-channel.js.map +1 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.js +46 -0
- package/.kb/runtime/workspaces/ws_94c2deab-4cf9-49cb-94ac-3958062754a1/ws/progress-channel.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.js +215 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/health.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.js +271 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/list.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.js +230 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/logs.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.js +228 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/metrics.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.js +281 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/run.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.js +266 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/status.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.js +284 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/commands/workflow-run.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/flags-WLdpSZl4.d.ts +77 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.d.ts +2 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.js +441 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/index.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.d.ts +196 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.js +441 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/manifest.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.d.ts +19 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.js +48 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/cron-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.d.ts +6 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.js +170 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/index.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.d.ts +12 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-cancel-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.d.ts +22 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.js +52 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-logs-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.js +43 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/job-steps-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.d.ts +26 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.js +63 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/jobs-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/pending-approvals-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.d.ts +16 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.js +58 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/resolve-approval-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.d.ts +9 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/run-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.js +50 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/runs-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.d.ts +7 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.js +39 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/stats-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.d.ts +10 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.js +46 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-detail-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.js +47 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-cancel-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.d.ts +14 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.js +53 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-run-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.d.ts +13 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.js +54 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflow-runs-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.d.ts +12 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.js +51 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/rest/workflows-list-handler.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.d.ts +17 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.js +133 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/logs-channel.js.map +1 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.d.ts +11 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.js +46 -0
- package/.kb/runtime/workspaces/ws_f0f301b8-388d-4dc4-b301-475f2bc95f02/ws/progress-channel.js.map +1 -0
- package/README.md +54 -0
- package/eslint.config.js +23 -0
- package/package.json +72 -0
- package/src/.kb/agents/sessions/session-1773470583796-ximqnfk/kpi-baseline.json +17 -0
- package/src/.kb/memory/sessions/session-1773470583796-ximqnfk/fact-sheet.json +1 -0
- package/src/bootstrap.ts +233 -0
- package/src/diagnostics/header-debug.ts +37 -0
- package/src/events/hub.ts +60 -0
- package/src/events/index.ts +1 -0
- package/src/index.ts +13 -0
- package/src/manifest.ts +21 -0
- package/src/middleware/__tests__/cache.spec.ts +184 -0
- package/src/middleware/__tests__/envelope.spec.ts +268 -0
- package/src/middleware/__tests__/metrics.redis.spec.ts +64 -0
- package/src/middleware/__tests__/rate-limit.spec.ts +283 -0
- package/src/middleware/__tests__/request-id.spec.ts +160 -0
- package/src/middleware/cache.ts +67 -0
- package/src/middleware/envelope.ts +136 -0
- package/src/middleware/error-guard.ts +69 -0
- package/src/middleware/index.ts +37 -0
- package/src/middleware/metrics.ts +810 -0
- package/src/middleware/mock-mode.ts +44 -0
- package/src/middleware/prom-metrics.ts +284 -0
- package/src/middleware/rate-limit-routes.ts +73 -0
- package/src/middleware/rate-limit.ts +72 -0
- package/src/middleware/request-id.ts +41 -0
- package/src/middleware/request-timeout.ts +69 -0
- package/src/middleware/security-headers.ts +24 -0
- package/src/middleware/startup-guard.ts +107 -0
- package/src/observability/service-contract.ts +192 -0
- package/src/plugins/index.ts +118 -0
- package/src/routes/__tests__/adapters-date-helpers.spec.ts +332 -0
- package/src/routes/__tests__/adapters.spec.ts +680 -0
- package/src/routes/__tests__/cache.spec.ts +264 -0
- package/src/routes/__tests__/events.spec.ts +434 -0
- package/src/routes/__tests__/health.spec.ts +414 -0
- package/src/routes/__tests__/logs.spec.ts +494 -0
- package/src/routes/__tests__/observability.spec.ts +392 -0
- package/src/routes/__tests__/plugins.spec.ts +931 -0
- package/src/routes/__tests__/workflow-management.spec.ts +698 -0
- package/src/routes/__tests__/workflows.spec.ts +204 -0
- package/src/routes/adapter-call.ts +220 -0
- package/src/routes/adapters.ts +1206 -0
- package/src/routes/analytics.ts +328 -0
- package/src/routes/cache.ts +104 -0
- package/src/routes/debug-routes.ts +95 -0
- package/src/routes/events.ts +115 -0
- package/src/routes/health.ts +348 -0
- package/src/routes/hello.ts +47 -0
- package/src/routes/index.ts +395 -0
- package/src/routes/jobs.ts +253 -0
- package/src/routes/logs.ts +718 -0
- package/src/routes/metrics.ts +120 -0
- package/src/routes/observability.ts +1388 -0
- package/src/routes/openapi.ts +101 -0
- package/src/routes/platform.ts +143 -0
- package/src/routes/plugins.ts +998 -0
- package/src/routes/readiness.ts +83 -0
- package/src/routes/workflow-management.ts +469 -0
- package/src/routes/workflows.ts +256 -0
- package/src/server.ts +203 -0
- package/src/services/historical-metrics.ts +496 -0
- package/src/services/incident-analyzer.ts +289 -0
- package/src/services/incident-detector.ts +691 -0
- package/src/services/incident-schema.sql +76 -0
- package/src/services/incident-storage.ts +593 -0
- package/src/services/system-metrics-collector.ts +244 -0
- package/src/types/fastify.d.ts +58 -0
- package/src/utils/__tests__/sse-auth.spec.ts +113 -0
- package/src/utils/path-helpers.ts +15 -0
- package/src/utils/repo.ts +42 -0
- package/src/utils/schema.ts +20 -0
- package/src/utils/sse-auth.ts +81 -0
- package/test-sandbox.sh +105 -0
- package/tsconfig.build.json +15 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +18 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as _kb_labs_perm_presets from '@kb-labs/perm-presets';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* KB Labs Workflow CLI - Manifest V3
|
|
5
|
+
*
|
|
6
|
+
* Provides CLI commands for interacting with Workflow Daemon via HTTP API.
|
|
7
|
+
*/
|
|
8
|
+
declare const manifest: {
|
|
9
|
+
schema: string;
|
|
10
|
+
id: string;
|
|
11
|
+
version: string;
|
|
12
|
+
display: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
};
|
|
17
|
+
platform: {
|
|
18
|
+
requires: never[];
|
|
19
|
+
optional: never[];
|
|
20
|
+
};
|
|
21
|
+
cli: {
|
|
22
|
+
commands: {
|
|
23
|
+
id: string;
|
|
24
|
+
group: string;
|
|
25
|
+
describe: string;
|
|
26
|
+
longDescription: string;
|
|
27
|
+
handler: string;
|
|
28
|
+
handlerPath: string;
|
|
29
|
+
flags: {
|
|
30
|
+
name: string;
|
|
31
|
+
type: "string" | "boolean" | "number" | "array";
|
|
32
|
+
alias?: string;
|
|
33
|
+
default?: unknown;
|
|
34
|
+
description?: string;
|
|
35
|
+
choices?: string[];
|
|
36
|
+
required?: boolean;
|
|
37
|
+
}[];
|
|
38
|
+
examples: string[];
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
rest: {
|
|
42
|
+
basePath: string;
|
|
43
|
+
routes: ({
|
|
44
|
+
method: string;
|
|
45
|
+
path: "/stats";
|
|
46
|
+
handler: string;
|
|
47
|
+
describe: string;
|
|
48
|
+
output: {
|
|
49
|
+
zod: string;
|
|
50
|
+
};
|
|
51
|
+
input?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
method: string;
|
|
54
|
+
path: "/workflows";
|
|
55
|
+
handler: string;
|
|
56
|
+
describe: string;
|
|
57
|
+
output: {
|
|
58
|
+
zod: string;
|
|
59
|
+
};
|
|
60
|
+
input?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
method: string;
|
|
63
|
+
path: "/workflows/:id";
|
|
64
|
+
handler: string;
|
|
65
|
+
describe: string;
|
|
66
|
+
output: {
|
|
67
|
+
zod: string;
|
|
68
|
+
};
|
|
69
|
+
input?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
method: string;
|
|
72
|
+
path: "/workflows/:id/run";
|
|
73
|
+
handler: string;
|
|
74
|
+
describe: string;
|
|
75
|
+
input: {
|
|
76
|
+
zod: string;
|
|
77
|
+
};
|
|
78
|
+
output?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
method: string;
|
|
81
|
+
path: "/workflows/:id/runs";
|
|
82
|
+
handler: string;
|
|
83
|
+
describe: string;
|
|
84
|
+
output: {
|
|
85
|
+
zod: string;
|
|
86
|
+
};
|
|
87
|
+
input?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
method: string;
|
|
90
|
+
path: "/workflows/runs/:runId/cancel";
|
|
91
|
+
handler: string;
|
|
92
|
+
describe: string;
|
|
93
|
+
output?: undefined;
|
|
94
|
+
input?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
method: string;
|
|
97
|
+
path: "/runs";
|
|
98
|
+
handler: string;
|
|
99
|
+
describe: string;
|
|
100
|
+
output?: undefined;
|
|
101
|
+
input?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
method: string;
|
|
104
|
+
path: "/runs/:runId";
|
|
105
|
+
handler: string;
|
|
106
|
+
describe: string;
|
|
107
|
+
output?: undefined;
|
|
108
|
+
input?: undefined;
|
|
109
|
+
} | {
|
|
110
|
+
method: string;
|
|
111
|
+
path: "/jobs";
|
|
112
|
+
handler: string;
|
|
113
|
+
describe: string;
|
|
114
|
+
output: {
|
|
115
|
+
zod: string;
|
|
116
|
+
};
|
|
117
|
+
input?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
method: string;
|
|
120
|
+
path: "/jobs/:jobId";
|
|
121
|
+
handler: string;
|
|
122
|
+
describe: string;
|
|
123
|
+
output: {
|
|
124
|
+
zod: string;
|
|
125
|
+
};
|
|
126
|
+
input?: undefined;
|
|
127
|
+
} | {
|
|
128
|
+
method: string;
|
|
129
|
+
path: "/jobs/:jobId/logs";
|
|
130
|
+
handler: string;
|
|
131
|
+
describe: string;
|
|
132
|
+
output: {
|
|
133
|
+
zod: string;
|
|
134
|
+
};
|
|
135
|
+
input?: undefined;
|
|
136
|
+
} | {
|
|
137
|
+
method: string;
|
|
138
|
+
path: "/jobs/:jobId/steps";
|
|
139
|
+
handler: string;
|
|
140
|
+
describe: string;
|
|
141
|
+
output: {
|
|
142
|
+
zod: string;
|
|
143
|
+
};
|
|
144
|
+
input?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
method: string;
|
|
147
|
+
path: "/jobs/:jobId/cancel";
|
|
148
|
+
handler: string;
|
|
149
|
+
describe: string;
|
|
150
|
+
output: {
|
|
151
|
+
zod: string;
|
|
152
|
+
};
|
|
153
|
+
input?: undefined;
|
|
154
|
+
} | {
|
|
155
|
+
method: string;
|
|
156
|
+
path: "/cron";
|
|
157
|
+
handler: string;
|
|
158
|
+
describe: string;
|
|
159
|
+
output: {
|
|
160
|
+
zod: string;
|
|
161
|
+
};
|
|
162
|
+
input?: undefined;
|
|
163
|
+
} | {
|
|
164
|
+
method: string;
|
|
165
|
+
path: "/runs/:runId/pending-approvals";
|
|
166
|
+
handler: string;
|
|
167
|
+
describe: string;
|
|
168
|
+
output?: undefined;
|
|
169
|
+
input?: undefined;
|
|
170
|
+
} | {
|
|
171
|
+
method: string;
|
|
172
|
+
path: "/runs/:runId/approve";
|
|
173
|
+
handler: string;
|
|
174
|
+
describe: string;
|
|
175
|
+
output?: undefined;
|
|
176
|
+
input?: undefined;
|
|
177
|
+
})[];
|
|
178
|
+
};
|
|
179
|
+
ws: {
|
|
180
|
+
basePath: string;
|
|
181
|
+
defaults: {
|
|
182
|
+
timeoutMs: number;
|
|
183
|
+
maxMessageSize: number;
|
|
184
|
+
auth: string;
|
|
185
|
+
idleTimeoutMs: number;
|
|
186
|
+
};
|
|
187
|
+
channels: {
|
|
188
|
+
path: string;
|
|
189
|
+
handler: string;
|
|
190
|
+
description: string;
|
|
191
|
+
}[];
|
|
192
|
+
};
|
|
193
|
+
permissions: _kb_labs_perm_presets.RuntimePermissionSpec;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export { manifest };
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { combinePermissions, defineCommandFlags } from '@kb-labs/sdk';
|
|
2
|
+
import { WORKFLOW_ROUTES, WORKFLOW_BASE_PATH } from '@kb-labs/workflow-contracts';
|
|
3
|
+
|
|
4
|
+
// src/manifest.ts
|
|
5
|
+
|
|
6
|
+
// src/flags.ts
|
|
7
|
+
var OUTPUT_JSON_DESCRIPTION = "Output result as JSON";
|
|
8
|
+
var healthFlags = {
|
|
9
|
+
json: {
|
|
10
|
+
type: "boolean",
|
|
11
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
12
|
+
default: false
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var metricsFlags = {
|
|
16
|
+
json: {
|
|
17
|
+
type: "boolean",
|
|
18
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var statusFlags = {
|
|
23
|
+
json: {
|
|
24
|
+
type: "boolean",
|
|
25
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
"job-id": {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Job ID to get status for"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var logsFlags = {
|
|
34
|
+
json: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
"job-id": {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Job ID to get logs for (required)"
|
|
42
|
+
},
|
|
43
|
+
follow: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
description: "Follow log output (stream new logs)",
|
|
46
|
+
default: false
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var listFlags = {
|
|
50
|
+
json: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
55
|
+
status: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Filter by status (running, completed, failed)"
|
|
58
|
+
},
|
|
59
|
+
type: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: 'Filter by type: "runs" (active executions), "cron" (scheduled jobs)'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var runFlags = {
|
|
65
|
+
json: {
|
|
66
|
+
type: "boolean",
|
|
67
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
handler: {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: 'Plugin handler to run (e.g., "mind:rag-query")'
|
|
73
|
+
},
|
|
74
|
+
input: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "JSON string of input parameters"
|
|
77
|
+
},
|
|
78
|
+
priority: {
|
|
79
|
+
type: "number",
|
|
80
|
+
description: "Job priority (1-10, default: 5)"
|
|
81
|
+
},
|
|
82
|
+
wait: {
|
|
83
|
+
type: "boolean",
|
|
84
|
+
description: "Wait for job completion",
|
|
85
|
+
default: false
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var workflowRunFlags = {
|
|
89
|
+
json: {
|
|
90
|
+
type: "boolean",
|
|
91
|
+
description: OUTPUT_JSON_DESCRIPTION,
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
"workflow-id": {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: 'Workflow ID to run (e.g., "release-manager/create-release")'
|
|
97
|
+
},
|
|
98
|
+
input: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "JSON string of workflow input payload"
|
|
101
|
+
},
|
|
102
|
+
isolation: {
|
|
103
|
+
type: "string",
|
|
104
|
+
description: "Isolation profile: strict, balanced, or relaxed"
|
|
105
|
+
},
|
|
106
|
+
"target-namespace": {
|
|
107
|
+
type: "string",
|
|
108
|
+
description: "Execution target namespace"
|
|
109
|
+
},
|
|
110
|
+
"target-environment-id": {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "Execution target environment ID"
|
|
113
|
+
},
|
|
114
|
+
"target-workspace-id": {
|
|
115
|
+
type: "string",
|
|
116
|
+
description: "Execution target workspace ID"
|
|
117
|
+
},
|
|
118
|
+
"target-workdir": {
|
|
119
|
+
type: "string",
|
|
120
|
+
description: "Execution target workdir override"
|
|
121
|
+
},
|
|
122
|
+
"trigger-type": {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Trigger type: manual, api, or cron"
|
|
125
|
+
},
|
|
126
|
+
"trigger-user": {
|
|
127
|
+
type: "string",
|
|
128
|
+
description: "Trigger user"
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var pluginPermissions = combinePermissions().withEnv(["WORKFLOW_DAEMON_URL"]).withNetwork({
|
|
132
|
+
fetch: ["http://localhost:*", "http://127.0.0.1:*"]
|
|
133
|
+
}).withQuotas({
|
|
134
|
+
timeoutMs: 3e4,
|
|
135
|
+
// 30 seconds for HTTP requests
|
|
136
|
+
memoryMb: 128
|
|
137
|
+
}).build();
|
|
138
|
+
var manifest = {
|
|
139
|
+
schema: "kb.plugin/3",
|
|
140
|
+
id: "@kb-labs/workflow",
|
|
141
|
+
version: "1.0.0",
|
|
142
|
+
display: {
|
|
143
|
+
name: "Workflow CLI",
|
|
144
|
+
description: "CLI commands for interacting with KB Labs Workflow Daemon.",
|
|
145
|
+
tags: ["workflow", "daemon", "jobs", "orchestration"]
|
|
146
|
+
},
|
|
147
|
+
// No platform requirements - just HTTP client
|
|
148
|
+
platform: {
|
|
149
|
+
requires: [],
|
|
150
|
+
optional: []
|
|
151
|
+
},
|
|
152
|
+
cli: {
|
|
153
|
+
commands: [
|
|
154
|
+
// workflow:health - Check daemon health
|
|
155
|
+
{
|
|
156
|
+
id: "workflow:health",
|
|
157
|
+
group: "workflow",
|
|
158
|
+
describe: "Check workflow daemon health status.",
|
|
159
|
+
longDescription: "Performs a health check on the workflow daemon by making an HTTP request to /health endpoint. Use this to verify the daemon is running and responding.",
|
|
160
|
+
handler: "./commands/health.js#default",
|
|
161
|
+
handlerPath: "./commands/health.js",
|
|
162
|
+
flags: defineCommandFlags(healthFlags),
|
|
163
|
+
examples: [
|
|
164
|
+
"kb workflow health",
|
|
165
|
+
"kb workflow health --json"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
// workflow:metrics - Get metrics
|
|
169
|
+
{
|
|
170
|
+
id: "workflow:metrics",
|
|
171
|
+
group: "workflow",
|
|
172
|
+
describe: "Get workflow daemon metrics.",
|
|
173
|
+
longDescription: "Fetches comprehensive metrics from the workflow daemon including total runs, queued jobs, running jobs, completed jobs, and failure counts.",
|
|
174
|
+
handler: "./commands/metrics.js#default",
|
|
175
|
+
handlerPath: "./commands/metrics.js",
|
|
176
|
+
flags: defineCommandFlags(metricsFlags),
|
|
177
|
+
examples: [
|
|
178
|
+
"kb workflow metrics",
|
|
179
|
+
"kb workflow metrics --json"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
// workflow:status - Get job status
|
|
183
|
+
{
|
|
184
|
+
id: "workflow:status",
|
|
185
|
+
group: "workflow",
|
|
186
|
+
describe: "Get status of a specific workflow job.",
|
|
187
|
+
longDescription: "Retrieves detailed status information for a specific job by ID, including current state, start time, and completion time if finished.",
|
|
188
|
+
handler: "./commands/status.js#default",
|
|
189
|
+
handlerPath: "./commands/status.js",
|
|
190
|
+
flags: defineCommandFlags(statusFlags),
|
|
191
|
+
examples: [
|
|
192
|
+
"kb workflow status --job-id=abc123",
|
|
193
|
+
"kb workflow status --job-id=abc123 --json"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
// workflow:logs - Get job logs
|
|
197
|
+
{
|
|
198
|
+
id: "workflow:logs",
|
|
199
|
+
group: "workflow",
|
|
200
|
+
describe: "Get logs for a specific workflow job.",
|
|
201
|
+
longDescription: "Fetches execution logs for a specific job by ID. Note: Log integration with platform.logger is pending, currently returns placeholder data.",
|
|
202
|
+
handler: "./commands/logs.js#default",
|
|
203
|
+
handlerPath: "./commands/logs.js",
|
|
204
|
+
flags: defineCommandFlags(logsFlags),
|
|
205
|
+
examples: [
|
|
206
|
+
"kb workflow logs --job-id=abc123",
|
|
207
|
+
"kb workflow logs --job-id=abc123 --json",
|
|
208
|
+
"kb workflow logs --job-id=abc123 --follow"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
// workflow:list - List active executions
|
|
212
|
+
{
|
|
213
|
+
id: "workflow:list",
|
|
214
|
+
group: "workflow",
|
|
215
|
+
describe: "List active workflow executions.",
|
|
216
|
+
longDescription: "Lists all currently active workflow executions or cron jobs. Can be filtered by status (running, queued, completed, failed, cancelled) or type (runs, cron).",
|
|
217
|
+
handler: "./commands/list.js#default",
|
|
218
|
+
handlerPath: "./commands/list.js",
|
|
219
|
+
flags: defineCommandFlags(listFlags),
|
|
220
|
+
examples: [
|
|
221
|
+
"kb workflow list",
|
|
222
|
+
"kb workflow list --status=running",
|
|
223
|
+
"kb workflow list --type=cron",
|
|
224
|
+
"kb workflow list --json"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
// workflow:job-run - Submit raw job for execution
|
|
228
|
+
{
|
|
229
|
+
id: "workflow:job-run",
|
|
230
|
+
group: "workflow",
|
|
231
|
+
describe: "Submit a raw job for execution.",
|
|
232
|
+
longDescription: "Submits a job to the workflow daemon for execution. Requires a handler (plugin command) and optionally accepts input parameters as JSON. Can wait for job completion with --wait flag.",
|
|
233
|
+
handler: "./commands/run.js#default",
|
|
234
|
+
handlerPath: "./commands/run.js",
|
|
235
|
+
flags: defineCommandFlags(runFlags),
|
|
236
|
+
examples: [
|
|
237
|
+
`kb workflow job-run --handler=mind:rag-query --input='{"text":"test"}'`,
|
|
238
|
+
`kb workflow job-run --handler=mind:rag-query --input='{"text":"test"}' --wait`,
|
|
239
|
+
`kb workflow job-run --handler=mind:rag-query --input='{"text":"test"}' --priority=8`,
|
|
240
|
+
`kb workflow job-run --handler=mind:rag-query --input='{"text":"test"}' --json`
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
// workflow:run - Run workflow by workflow ID
|
|
244
|
+
{
|
|
245
|
+
id: "workflow:run",
|
|
246
|
+
group: "workflow",
|
|
247
|
+
describe: "Run workflow by ID.",
|
|
248
|
+
longDescription: "Runs a workflow definition by workflow ID via /api/v1/workflows/:id/run endpoint. Supports request-level target and isolation overrides.",
|
|
249
|
+
handler: "./commands/workflow-run.js#default",
|
|
250
|
+
handlerPath: "./commands/workflow-run.js",
|
|
251
|
+
flags: defineCommandFlags(workflowRunFlags),
|
|
252
|
+
examples: [
|
|
253
|
+
"kb workflow run --workflow-id=release-manager/create-release",
|
|
254
|
+
"kb workflow run --workflow-id=release-manager/create-release --isolation=strict --target-namespace=team-a/prod",
|
|
255
|
+
"kb workflow run --workflow-id=release-manager/create-release --target-environment-id=env-123 --json"
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
// REST API routes (proxy to workflow daemon)
|
|
261
|
+
rest: {
|
|
262
|
+
basePath: WORKFLOW_BASE_PATH,
|
|
263
|
+
routes: [
|
|
264
|
+
// GET /stats - Dashboard statistics
|
|
265
|
+
{
|
|
266
|
+
method: "GET",
|
|
267
|
+
path: WORKFLOW_ROUTES.STATS,
|
|
268
|
+
handler: "./rest/stats-handler.js#default",
|
|
269
|
+
describe: "Get dashboard statistics",
|
|
270
|
+
output: {
|
|
271
|
+
zod: "@kb-labs/workflow-contracts#DashboardStatsResponseSchema"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
// GET /workflows - List workflow definitions
|
|
275
|
+
{
|
|
276
|
+
method: "GET",
|
|
277
|
+
path: WORKFLOW_ROUTES.WORKFLOWS,
|
|
278
|
+
handler: "./rest/workflows-list-handler.js#default",
|
|
279
|
+
describe: "List all workflow definitions",
|
|
280
|
+
output: {
|
|
281
|
+
zod: "@kb-labs/workflow-contracts#WorkflowListResponseSchema"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
// GET /workflows/:id - Get workflow detail
|
|
285
|
+
{
|
|
286
|
+
method: "GET",
|
|
287
|
+
path: WORKFLOW_ROUTES.WORKFLOW_DETAIL,
|
|
288
|
+
handler: "./rest/workflow-detail-handler.js#default",
|
|
289
|
+
describe: "Get workflow definition details",
|
|
290
|
+
output: {
|
|
291
|
+
zod: "@kb-labs/workflow-contracts#WorkflowInfoSchema"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
// POST /workflows/:id/run - Run workflow
|
|
295
|
+
{
|
|
296
|
+
method: "POST",
|
|
297
|
+
path: WORKFLOW_ROUTES.WORKFLOW_RUN,
|
|
298
|
+
handler: "./rest/workflow-run-handler.js#default",
|
|
299
|
+
describe: "Run a workflow",
|
|
300
|
+
input: {
|
|
301
|
+
zod: "@kb-labs/workflow-contracts#WorkflowRunRequestSchema"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
// GET /workflows/:workflowId/runs - Get workflow run history
|
|
305
|
+
{
|
|
306
|
+
method: "GET",
|
|
307
|
+
path: WORKFLOW_ROUTES.WORKFLOW_RUNS,
|
|
308
|
+
handler: "./rest/workflow-runs-handler.js#default",
|
|
309
|
+
describe: "Get workflow run history with pagination",
|
|
310
|
+
output: {
|
|
311
|
+
zod: "@kb-labs/workflow-contracts#WorkflowRunHistoryResponseSchema"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
// POST /workflows/runs/:runId/cancel - Cancel a workflow run
|
|
315
|
+
{
|
|
316
|
+
method: "POST",
|
|
317
|
+
path: WORKFLOW_ROUTES.WORKFLOW_RUN_CANCEL,
|
|
318
|
+
handler: "./rest/workflow-run-cancel-handler.js#default",
|
|
319
|
+
describe: "Cancel a running or queued workflow run"
|
|
320
|
+
},
|
|
321
|
+
// GET /runs - List all workflow runs
|
|
322
|
+
{
|
|
323
|
+
method: "GET",
|
|
324
|
+
path: WORKFLOW_ROUTES.RUNS,
|
|
325
|
+
handler: "./rest/runs-list-handler.js#default",
|
|
326
|
+
describe: "List all workflow runs across all workflows"
|
|
327
|
+
},
|
|
328
|
+
// GET /runs/:runId - Get a specific workflow run
|
|
329
|
+
{
|
|
330
|
+
method: "GET",
|
|
331
|
+
path: WORKFLOW_ROUTES.RUN_DETAIL,
|
|
332
|
+
handler: "./rest/run-detail-handler.js#default",
|
|
333
|
+
describe: "Get detailed information about a specific workflow run"
|
|
334
|
+
},
|
|
335
|
+
// GET /workflows/jobs - List jobs
|
|
336
|
+
{
|
|
337
|
+
method: "GET",
|
|
338
|
+
path: WORKFLOW_ROUTES.JOBS,
|
|
339
|
+
handler: "./rest/jobs-list-handler.js#default",
|
|
340
|
+
describe: "List workflow jobs with optional filters",
|
|
341
|
+
output: {
|
|
342
|
+
zod: "@kb-labs/workflow-contracts#JobListResponseSchema"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
// GET /workflows/jobs/:jobId - Get job detail
|
|
346
|
+
{
|
|
347
|
+
method: "GET",
|
|
348
|
+
path: WORKFLOW_ROUTES.JOB_DETAIL,
|
|
349
|
+
handler: "./rest/job-detail-handler.js#default",
|
|
350
|
+
describe: "Get detailed information about a specific job",
|
|
351
|
+
output: {
|
|
352
|
+
zod: "@kb-labs/workflow-contracts#JobStatusInfoSchema"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
// GET /workflows/jobs/:jobId/logs - Get job logs
|
|
356
|
+
{
|
|
357
|
+
method: "GET",
|
|
358
|
+
path: WORKFLOW_ROUTES.JOB_LOGS,
|
|
359
|
+
handler: "./rest/job-logs-handler.js#default",
|
|
360
|
+
describe: "Get execution logs for a specific job",
|
|
361
|
+
output: {
|
|
362
|
+
zod: "@kb-labs/workflow-contracts#JobLogsResponseSchema"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
// GET /workflows/jobs/:jobId/steps - Get job steps
|
|
366
|
+
{
|
|
367
|
+
method: "GET",
|
|
368
|
+
path: WORKFLOW_ROUTES.JOB_STEPS,
|
|
369
|
+
handler: "./rest/job-steps-handler.js#default",
|
|
370
|
+
describe: "Get execution steps and progress for a specific job",
|
|
371
|
+
output: {
|
|
372
|
+
zod: "@kb-labs/workflow-contracts#JobStepsResponseSchema"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
// POST /workflows/jobs/:jobId/cancel - Cancel job
|
|
376
|
+
{
|
|
377
|
+
method: "POST",
|
|
378
|
+
path: WORKFLOW_ROUTES.JOB_CANCEL,
|
|
379
|
+
handler: "./rest/job-cancel-handler.js#default",
|
|
380
|
+
describe: "Cancel a running or pending job",
|
|
381
|
+
output: {
|
|
382
|
+
zod: "@kb-labs/workflow-contracts#JobCancelResponseSchema"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
// GET /workflows/cron - List cron jobs
|
|
386
|
+
{
|
|
387
|
+
method: "GET",
|
|
388
|
+
path: WORKFLOW_ROUTES.CRON,
|
|
389
|
+
handler: "./rest/cron-list-handler.js#default",
|
|
390
|
+
describe: "List all registered cron jobs",
|
|
391
|
+
output: {
|
|
392
|
+
zod: "@kb-labs/workflow-contracts#CronListResponseSchema"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
// GET /runs/:runId/pending-approvals - List pending approvals
|
|
396
|
+
{
|
|
397
|
+
method: "GET",
|
|
398
|
+
path: WORKFLOW_ROUTES.PENDING_APPROVALS,
|
|
399
|
+
handler: "./rest/pending-approvals-handler.js#default",
|
|
400
|
+
describe: "List steps waiting for approval in a workflow run"
|
|
401
|
+
},
|
|
402
|
+
// POST /runs/:runId/approve - Resolve approval
|
|
403
|
+
{
|
|
404
|
+
method: "POST",
|
|
405
|
+
path: WORKFLOW_ROUTES.RESOLVE_APPROVAL,
|
|
406
|
+
handler: "./rest/resolve-approval-handler.js#default",
|
|
407
|
+
describe: "Approve or reject a pending approval step"
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
// WebSocket channels for real-time updates
|
|
412
|
+
ws: {
|
|
413
|
+
basePath: "/v1/ws/plugins/workflow",
|
|
414
|
+
defaults: {
|
|
415
|
+
timeoutMs: 6e5,
|
|
416
|
+
// 10 minutes
|
|
417
|
+
maxMessageSize: 1048576,
|
|
418
|
+
// 1MB
|
|
419
|
+
auth: "none",
|
|
420
|
+
idleTimeoutMs: 3e5
|
|
421
|
+
// 5 minutes
|
|
422
|
+
},
|
|
423
|
+
channels: [
|
|
424
|
+
{
|
|
425
|
+
path: "/logs/:jobId",
|
|
426
|
+
handler: "./ws/logs-channel.js#default",
|
|
427
|
+
description: "Real-time job logs streaming"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
path: "/progress/:jobId",
|
|
431
|
+
handler: "./ws/progress-channel.js#default",
|
|
432
|
+
description: "Real-time job progress updates"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
permissions: pluginPermissions
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
export { manifest };
|
|
440
|
+
//# sourceMappingURL=manifest.js.map
|
|
441
|
+
//# sourceMappingURL=manifest.js.map
|