opencastle 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/README.md +102 -131
- package/bin/cli.mjs +20 -10
- package/dist/cli/adapters/claude-code.d.ts +5 -3
- package/dist/cli/adapters/claude-code.d.ts.map +1 -1
- package/dist/cli/adapters/claude-code.js +7 -3
- package/dist/cli/adapters/claude-code.js.map +1 -1
- package/dist/cli/adapters/single-file-base.d.ts +18 -0
- package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
- package/dist/cli/adapters/single-file-base.js +29 -4
- package/dist/cli/adapters/single-file-base.js.map +1 -1
- package/dist/cli/agent-plugin.test.js +12 -0
- package/dist/cli/agent-plugin.test.js.map +1 -1
- package/dist/cli/agent-roster.test.js +0 -48
- package/dist/cli/agent-roster.test.js.map +1 -1
- package/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +20 -0
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/boundary.test.js +9 -7
- package/dist/cli/boundary.test.js.map +1 -1
- package/dist/cli/ci.d.ts.map +1 -1
- package/dist/cli/ci.js +6 -4
- package/dist/cli/ci.js.map +1 -1
- package/dist/cli/command-namespace.test.js +33 -0
- package/dist/cli/command-namespace.test.js.map +1 -1
- package/dist/cli/convoy/artifacts.d.ts +9 -2
- package/dist/cli/convoy/artifacts.d.ts.map +1 -1
- package/dist/cli/convoy/artifacts.js +13 -10
- package/dist/cli/convoy/artifacts.js.map +1 -1
- package/dist/cli/convoy/artifacts.test.js +4 -2
- package/dist/cli/convoy/artifacts.test.js.map +1 -1
- package/dist/cli/convoy/engine.d.ts +53 -23
- package/dist/cli/convoy/engine.d.ts.map +1 -1
- package/dist/cli/convoy/engine.git.test.d.ts +2 -0
- package/dist/cli/convoy/engine.git.test.d.ts.map +1 -0
- package/dist/cli/convoy/engine.git.test.js +435 -0
- package/dist/cli/convoy/engine.git.test.js.map +1 -0
- package/dist/cli/convoy/engine.js +1746 -2305
- package/dist/cli/convoy/engine.js.map +1 -1
- package/dist/cli/convoy/engine.test.js +698 -678
- package/dist/cli/convoy/engine.test.js.map +1 -1
- package/dist/cli/convoy/event-schemas.d.ts +2 -0
- package/dist/cli/convoy/event-schemas.d.ts.map +1 -1
- package/dist/cli/convoy/event-schemas.js +59 -57
- package/dist/cli/convoy/event-schemas.js.map +1 -1
- package/dist/cli/convoy/events.d.ts +4 -1
- package/dist/cli/convoy/events.d.ts.map +1 -1
- package/dist/cli/convoy/events.js +69 -84
- package/dist/cli/convoy/events.js.map +1 -1
- package/dist/cli/convoy/events.test.js +50 -9
- package/dist/cli/convoy/events.test.js.map +1 -1
- package/dist/cli/convoy/gates.d.ts +9 -4
- package/dist/cli/convoy/gates.d.ts.map +1 -1
- package/dist/cli/convoy/gates.js +29 -14
- package/dist/cli/convoy/gates.js.map +1 -1
- package/dist/cli/convoy/isolation.d.ts +32 -6
- package/dist/cli/convoy/isolation.d.ts.map +1 -1
- package/dist/cli/convoy/isolation.js +72 -34
- package/dist/cli/convoy/isolation.js.map +1 -1
- package/dist/cli/convoy/isolation.test.js +66 -42
- package/dist/cli/convoy/isolation.test.js.map +1 -1
- package/dist/cli/convoy/lock.d.ts.map +1 -1
- package/dist/cli/convoy/lock.js +25 -10
- package/dist/cli/convoy/lock.js.map +1 -1
- package/dist/cli/convoy/lock.test.js +12 -0
- package/dist/cli/convoy/lock.test.js.map +1 -1
- package/dist/cli/convoy/merge.d.ts +21 -4
- package/dist/cli/convoy/merge.d.ts.map +1 -1
- package/dist/cli/convoy/merge.js +69 -53
- package/dist/cli/convoy/merge.js.map +1 -1
- package/dist/cli/convoy/merge.test.js +23 -1
- package/dist/cli/convoy/merge.test.js.map +1 -1
- package/dist/cli/convoy/progress.d.ts +35 -0
- package/dist/cli/convoy/progress.d.ts.map +1 -0
- package/dist/cli/convoy/progress.js +103 -0
- package/dist/cli/convoy/progress.js.map +1 -0
- package/dist/cli/convoy/progress.test.d.ts +2 -0
- package/dist/cli/convoy/progress.test.d.ts.map +1 -0
- package/dist/cli/convoy/progress.test.js +53 -0
- package/dist/cli/convoy/progress.test.js.map +1 -0
- package/dist/cli/convoy/read-model.d.ts +468 -0
- package/dist/cli/convoy/read-model.d.ts.map +1 -0
- package/dist/cli/convoy/read-model.js +1132 -0
- package/dist/cli/convoy/read-model.js.map +1 -0
- package/dist/cli/convoy/read-model.test.d.ts +2 -0
- package/dist/cli/convoy/read-model.test.d.ts.map +1 -0
- package/dist/cli/convoy/read-model.test.js +609 -0
- package/dist/cli/convoy/read-model.test.js.map +1 -0
- package/dist/cli/convoy/redact.d.ts +34 -0
- package/dist/cli/convoy/redact.d.ts.map +1 -0
- package/dist/cli/convoy/redact.js +66 -0
- package/dist/cli/convoy/redact.js.map +1 -0
- package/dist/cli/convoy/redact.test.d.ts +2 -0
- package/dist/cli/convoy/redact.test.d.ts.map +1 -0
- package/dist/cli/convoy/redact.test.js +43 -0
- package/dist/cli/convoy/redact.test.js.map +1 -0
- package/dist/cli/convoy/reviewer.d.ts +65 -0
- package/dist/cli/convoy/reviewer.d.ts.map +1 -0
- package/dist/cli/convoy/reviewer.js +141 -0
- package/dist/cli/convoy/reviewer.js.map +1 -0
- package/dist/cli/convoy/reviewer.test.d.ts +2 -0
- package/dist/cli/convoy/reviewer.test.d.ts.map +1 -0
- package/dist/cli/convoy/reviewer.test.js +96 -0
- package/dist/cli/convoy/reviewer.test.js.map +1 -0
- package/dist/cli/convoy/schedule.d.ts +30 -0
- package/dist/cli/convoy/schedule.d.ts.map +1 -0
- package/dist/cli/convoy/schedule.js +111 -0
- package/dist/cli/convoy/schedule.js.map +1 -0
- package/dist/cli/convoy/schedule.test.d.ts +2 -0
- package/dist/cli/convoy/schedule.test.d.ts.map +1 -0
- package/dist/cli/convoy/schedule.test.js +45 -0
- package/dist/cli/convoy/schedule.test.js.map +1 -0
- package/dist/cli/convoy/spec-builder.d.ts +120 -30
- package/dist/cli/convoy/spec-builder.d.ts.map +1 -1
- package/dist/cli/convoy/spec-builder.js +438 -114
- package/dist/cli/convoy/spec-builder.js.map +1 -1
- package/dist/cli/convoy/spec-builder.test.js +419 -435
- package/dist/cli/convoy/spec-builder.test.js.map +1 -1
- package/dist/cli/convoy/spec-types.d.ts +46 -92
- package/dist/cli/convoy/spec-types.d.ts.map +1 -1
- package/dist/cli/convoy/store.d.ts +6 -1
- package/dist/cli/convoy/store.d.ts.map +1 -1
- package/dist/cli/convoy/store.js +111 -15
- package/dist/cli/convoy/store.js.map +1 -1
- package/dist/cli/convoy/store.test.js +59 -13
- package/dist/cli/convoy/store.test.js.map +1 -1
- package/dist/cli/convoy/types.d.ts +76 -113
- package/dist/cli/convoy/types.d.ts.map +1 -1
- package/dist/cli/convoy/types.js +6 -13
- package/dist/cli/convoy/types.js.map +1 -1
- package/dist/cli/convoy/worktree.d.ts +88 -3
- package/dist/cli/convoy/worktree.d.ts.map +1 -1
- package/dist/cli/convoy/worktree.js +282 -56
- package/dist/cli/convoy/worktree.js.map +1 -1
- package/dist/cli/convoy/worktree.test.js +132 -1
- package/dist/cli/convoy/worktree.test.js.map +1 -1
- package/dist/cli/convoy-args.test.js +9 -27
- package/dist/cli/convoy-args.test.js.map +1 -1
- package/dist/cli/convoy-cmd.d.ts +31 -6
- package/dist/cli/convoy-cmd.d.ts.map +1 -1
- package/dist/cli/convoy-cmd.js +150 -200
- package/dist/cli/convoy-cmd.js.map +1 -1
- package/dist/cli/convoy-cmd.test.d.ts +2 -0
- package/dist/cli/convoy-cmd.test.d.ts.map +1 -0
- package/dist/cli/convoy-cmd.test.js +144 -0
- package/dist/cli/convoy-cmd.test.js.map +1 -0
- package/dist/cli/dashboard.d.ts +24 -11
- package/dist/cli/dashboard.d.ts.map +1 -1
- package/dist/cli/dashboard.js +241 -303
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/dashboard.test.d.ts +2 -0
- package/dist/cli/dashboard.test.d.ts.map +1 -0
- package/dist/cli/dashboard.test.js +340 -0
- package/dist/cli/dashboard.test.js.map +1 -0
- package/dist/cli/dispatcher.test.js +41 -2
- package/dist/cli/dispatcher.test.js.map +1 -1
- package/dist/cli/docs-accuracy.test.js +36 -11
- package/dist/cli/docs-accuracy.test.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +9 -6
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/init-own-files.test.d.ts +2 -0
- package/dist/cli/init-own-files.test.d.ts.map +1 -0
- package/dist/cli/init-own-files.test.js +133 -0
- package/dist/cli/init-own-files.test.js.map +1 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +106 -7
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/init.test.js +5 -4
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/layers.d.ts.map +1 -1
- package/dist/cli/layers.js +13 -4
- package/dist/cli/layers.js.map +1 -1
- package/dist/cli/lesson.d.ts.map +1 -1
- package/dist/cli/lesson.js +6 -5
- package/dist/cli/lesson.js.map +1 -1
- package/dist/cli/log.d.ts +39 -0
- package/dist/cli/log.d.ts.map +1 -1
- package/dist/cli/log.js +267 -93
- package/dist/cli/log.js.map +1 -1
- package/dist/cli/log.test.d.ts +2 -0
- package/dist/cli/log.test.d.ts.map +1 -0
- package/dist/cli/log.test.js +208 -0
- package/dist/cli/log.test.js.map +1 -0
- package/dist/cli/nearest.d.ts +18 -0
- package/dist/cli/nearest.d.ts.map +1 -0
- package/dist/cli/nearest.js +38 -0
- package/dist/cli/nearest.js.map +1 -0
- package/dist/cli/nearest.test.d.ts +2 -0
- package/dist/cli/nearest.test.d.ts.map +1 -0
- package/dist/cli/nearest.test.js +24 -0
- package/dist/cli/nearest.test.js.map +1 -0
- package/dist/cli/pipeline.d.ts +61 -0
- package/dist/cli/pipeline.d.ts.map +1 -1
- package/dist/cli/pipeline.flow.test.d.ts +2 -0
- package/dist/cli/pipeline.flow.test.d.ts.map +1 -0
- package/dist/cli/pipeline.flow.test.js +524 -0
- package/dist/cli/pipeline.flow.test.js.map +1 -0
- package/dist/cli/pipeline.js +471 -690
- package/dist/cli/pipeline.js.map +1 -1
- package/dist/cli/plan.d.ts +82 -31
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +167 -507
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/plan.test.d.ts +2 -0
- package/dist/cli/plan.test.d.ts.map +1 -0
- package/dist/cli/plan.test.js +158 -0
- package/dist/cli/plan.test.js.map +1 -0
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +9 -7
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/prompt.test.js +20 -2
- package/dist/cli/prompt.test.js.map +1 -1
- package/dist/cli/remove.d.ts.map +1 -1
- package/dist/cli/remove.js +3 -1
- package/dist/cli/remove.js.map +1 -1
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +7 -1
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/run/adapters/agent-process.d.ts +82 -0
- package/dist/cli/run/adapters/agent-process.d.ts.map +1 -0
- package/dist/cli/run/adapters/agent-process.js +224 -0
- package/dist/cli/run/adapters/agent-process.js.map +1 -0
- package/dist/cli/run/adapters/agent-process.test.d.ts +2 -0
- package/dist/cli/run/adapters/agent-process.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/agent-process.test.js +159 -0
- package/dist/cli/run/adapters/agent-process.test.js.map +1 -0
- package/dist/cli/run/adapters/claude.d.ts +53 -2
- package/dist/cli/run/adapters/claude.d.ts.map +1 -1
- package/dist/cli/run/adapters/claude.js +147 -171
- package/dist/cli/run/adapters/claude.js.map +1 -1
- package/dist/cli/run/adapters/claude.test.js +197 -254
- package/dist/cli/run/adapters/claude.test.js.map +1 -1
- package/dist/cli/run/adapters/codex.d.ts +25 -2
- package/dist/cli/run/adapters/codex.d.ts.map +1 -1
- package/dist/cli/run/adapters/codex.js +113 -81
- package/dist/cli/run/adapters/codex.js.map +1 -1
- package/dist/cli/run/adapters/codex.test.js +116 -95
- package/dist/cli/run/adapters/codex.test.js.map +1 -1
- package/dist/cli/run/adapters/copilot.d.ts +35 -1
- package/dist/cli/run/adapters/copilot.d.ts.map +1 -1
- package/dist/cli/run/adapters/copilot.js +104 -287
- package/dist/cli/run/adapters/copilot.js.map +1 -1
- package/dist/cli/run/adapters/copilot.test.js +122 -282
- package/dist/cli/run/adapters/copilot.test.js.map +1 -1
- package/dist/cli/run/adapters/cursor.d.ts +25 -7
- package/dist/cli/run/adapters/cursor.d.ts.map +1 -1
- package/dist/cli/run/adapters/cursor.js +103 -156
- package/dist/cli/run/adapters/cursor.js.map +1 -1
- package/dist/cli/run/adapters/cursor.test.js +106 -218
- package/dist/cli/run/adapters/cursor.test.js.map +1 -1
- package/dist/cli/run/adapters/index.d.ts +34 -5
- package/dist/cli/run/adapters/index.d.ts.map +1 -1
- package/dist/cli/run/adapters/index.js +147 -21
- package/dist/cli/run/adapters/index.js.map +1 -1
- package/dist/cli/run/adapters/index.test.d.ts +2 -0
- package/dist/cli/run/adapters/index.test.d.ts.map +1 -0
- package/dist/cli/run/adapters/index.test.js +129 -0
- package/dist/cli/run/adapters/index.test.js.map +1 -0
- package/dist/cli/run/adapters/opencode.d.ts +25 -9
- package/dist/cli/run/adapters/opencode.d.ts.map +1 -1
- package/dist/cli/run/adapters/opencode.js +136 -152
- package/dist/cli/run/adapters/opencode.js.map +1 -1
- package/dist/cli/run/adapters/opencode.test.js +99 -218
- package/dist/cli/run/adapters/opencode.test.js.map +1 -1
- package/dist/cli/run/adapters/permission-modes.d.ts +47 -4
- package/dist/cli/run/adapters/permission-modes.d.ts.map +1 -1
- package/dist/cli/run/adapters/permission-modes.js +113 -37
- package/dist/cli/run/adapters/permission-modes.js.map +1 -1
- package/dist/cli/run/adapters/permission-modes.test.js +55 -40
- package/dist/cli/run/adapters/permission-modes.test.js.map +1 -1
- package/dist/cli/run/adapters/stub-cli.test-helper.d.ts +22 -0
- package/dist/cli/run/adapters/stub-cli.test-helper.d.ts.map +1 -0
- package/dist/cli/run/adapters/stub-cli.test-helper.js +73 -0
- package/dist/cli/run/adapters/stub-cli.test-helper.js.map +1 -0
- package/dist/cli/run/platform.d.ts +52 -0
- package/dist/cli/run/platform.d.ts.map +1 -0
- package/dist/cli/run/platform.js +207 -0
- package/dist/cli/run/platform.js.map +1 -0
- package/dist/cli/run/platform.test.d.ts +2 -0
- package/dist/cli/run/platform.test.d.ts.map +1 -0
- package/dist/cli/run/platform.test.js +119 -0
- package/dist/cli/run/platform.test.js.map +1 -0
- package/dist/cli/run/schema.d.ts +6 -8
- package/dist/cli/run/schema.d.ts.map +1 -1
- package/dist/cli/run/schema.js +44 -68
- package/dist/cli/run/schema.js.map +1 -1
- package/dist/cli/run/schema.test.js +59 -279
- package/dist/cli/run/schema.test.js.map +1 -1
- package/dist/cli/run.d.ts +34 -56
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +379 -1132
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/run.test.d.ts +2 -0
- package/dist/cli/run.test.d.ts.map +1 -0
- package/dist/cli/run.test.js +318 -0
- package/dist/cli/run.test.js.map +1 -0
- package/dist/cli/sync-check.d.ts.map +1 -1
- package/dist/cli/sync-check.js +12 -3
- package/dist/cli/sync-check.js.map +1 -1
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +3 -2
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/team-config.d.ts.map +1 -1
- package/dist/cli/team-config.js +2 -21
- package/dist/cli/team-config.js.map +1 -1
- package/dist/cli/tiers.test.js +4 -13
- package/dist/cli/tiers.test.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +4 -3
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/website-plugins.test.js +51 -2
- package/dist/cli/website-plugins.test.js.map +1 -1
- package/dist/orchestrator/plugins/coolify/config.d.ts.map +1 -1
- package/dist/orchestrator/plugins/coolify/config.js +13 -0
- package/dist/orchestrator/plugins/coolify/config.js.map +1 -1
- package/dist/orchestrator/plugins/sentry/config.d.ts.map +1 -1
- package/dist/orchestrator/plugins/sentry/config.js +13 -0
- package/dist/orchestrator/plugins/sentry/config.js.map +1 -1
- package/package.json +3 -10
- package/src/cli/adapters/claude-code.ts +7 -3
- package/src/cli/adapters/single-file-base.ts +47 -4
- package/src/cli/agent-plugin.test.ts +14 -0
- package/src/cli/agent-roster.test.ts +0 -55
- package/src/cli/bootstrap.ts +23 -0
- package/src/cli/boundary.test.ts +9 -7
- package/src/cli/ci.ts +6 -4
- package/src/cli/command-namespace.test.ts +35 -0
- package/src/cli/convoy/TELEMETRY.md +138 -130
- package/src/cli/convoy/artifacts.test.ts +4 -2
- package/src/cli/convoy/artifacts.ts +13 -12
- package/src/cli/convoy/engine.git.test.ts +462 -0
- package/src/cli/convoy/engine.test.ts +817 -850
- package/src/cli/convoy/engine.ts +1864 -2596
- package/src/cli/convoy/event-schemas.ts +63 -59
- package/src/cli/convoy/events.test.ts +58 -9
- package/src/cli/convoy/events.ts +69 -91
- package/src/cli/convoy/gates.ts +31 -12
- package/src/cli/convoy/isolation.test.ts +76 -43
- package/src/cli/convoy/isolation.ts +100 -38
- package/src/cli/convoy/lock.test.ts +16 -0
- package/src/cli/convoy/lock.ts +25 -8
- package/src/cli/convoy/merge.test.ts +25 -1
- package/src/cli/convoy/merge.ts +74 -61
- package/src/cli/convoy/progress.test.ts +59 -0
- package/src/cli/convoy/progress.ts +121 -0
- package/src/cli/convoy/read-model.test.ts +685 -0
- package/src/cli/convoy/read-model.ts +1469 -0
- package/src/cli/convoy/redact.test.ts +49 -0
- package/src/cli/convoy/redact.ts +73 -0
- package/src/cli/convoy/reviewer.test.ts +112 -0
- package/src/cli/convoy/reviewer.ts +196 -0
- package/src/cli/convoy/schedule.test.ts +56 -0
- package/src/cli/convoy/schedule.ts +109 -0
- package/src/cli/convoy/spec-builder.test.ts +460 -464
- package/src/cli/convoy/spec-builder.ts +460 -129
- package/src/cli/convoy/spec-types.ts +46 -108
- package/src/cli/convoy/store.test.ts +64 -13
- package/src/cli/convoy/store.ts +143 -33
- package/src/cli/convoy/types.ts +59 -71
- package/src/cli/convoy/worktree.test.ts +140 -1
- package/src/cli/convoy/worktree.ts +311 -61
- package/src/cli/convoy-args.test.ts +10 -30
- package/src/cli/convoy-cmd.test.ts +163 -0
- package/src/cli/convoy-cmd.ts +173 -215
- package/src/cli/dashboard/dashboard.css +2086 -0
- package/src/cli/dashboard/dashboard.js +1687 -0
- package/src/cli/dashboard/index.html +307 -0
- package/src/cli/dashboard.test.ts +382 -0
- package/src/cli/dashboard.ts +243 -339
- package/src/cli/dispatcher.test.ts +43 -2
- package/src/cli/docs-accuracy.test.ts +37 -10
- package/src/cli/doctor.ts +9 -6
- package/src/cli/init-own-files.test.ts +156 -0
- package/src/cli/init.test.ts +5 -4
- package/src/cli/init.ts +104 -7
- package/src/cli/layers.ts +13 -4
- package/src/cli/lesson.ts +6 -5
- package/src/cli/log.test.ts +228 -0
- package/src/cli/log.ts +302 -83
- package/src/cli/nearest.test.ts +27 -0
- package/src/cli/nearest.ts +38 -0
- package/src/cli/pipeline.flow.test.ts +607 -0
- package/src/cli/pipeline.ts +544 -759
- package/src/cli/plan.test.ts +193 -0
- package/src/cli/plan.ts +209 -545
- package/src/cli/prompt.test.ts +21 -2
- package/src/cli/prompt.ts +11 -7
- package/src/cli/remove.ts +3 -0
- package/src/cli/review.ts +7 -1
- package/src/cli/run/adapters/agent-process.test.ts +175 -0
- package/src/cli/run/adapters/agent-process.ts +252 -0
- package/src/cli/run/adapters/claude.test.ts +205 -260
- package/src/cli/run/adapters/claude.ts +151 -162
- package/src/cli/run/adapters/codex.test.ts +120 -100
- package/src/cli/run/adapters/codex.ts +115 -91
- package/src/cli/run/adapters/copilot.test.ts +135 -306
- package/src/cli/run/adapters/copilot.ts +105 -274
- package/src/cli/run/adapters/cursor.test.ts +111 -220
- package/src/cli/run/adapters/cursor.ts +105 -156
- package/src/cli/run/adapters/index.test.ts +148 -0
- package/src/cli/run/adapters/index.ts +168 -20
- package/src/cli/run/adapters/opencode.test.ts +106 -227
- package/src/cli/run/adapters/opencode.ts +139 -151
- package/src/cli/run/adapters/permission-modes.test.ts +63 -41
- package/src/cli/run/adapters/permission-modes.ts +118 -37
- package/src/cli/run/adapters/stub-cli.test-helper.ts +88 -0
- package/src/cli/run/platform.test.ts +128 -0
- package/src/cli/run/platform.ts +213 -0
- package/src/cli/run/schema.test.ts +62 -344
- package/src/cli/run/schema.ts +48 -78
- package/src/cli/run.test.ts +351 -0
- package/src/cli/run.ts +366 -1151
- package/src/cli/sync-check.ts +12 -3
- package/src/cli/sync.ts +3 -2
- package/src/cli/team-config.ts +2 -21
- package/src/cli/tiers.test.ts +4 -17
- package/src/cli/update.ts +4 -3
- package/src/cli/website-plugins.test.ts +55 -5
- package/src/orchestrator/agents/team-lead.agent.md +2 -2
- package/src/orchestrator/customizations/README.md +58 -13
- package/src/orchestrator/customizations/logs/README.md +23 -18
- package/src/orchestrator/instructions/general.instructions.md +1 -1
- package/src/orchestrator/plugins/coolify/config.ts +13 -0
- package/src/orchestrator/plugins/sentry/config.ts +13 -0
- package/src/orchestrator/prompts/assess-complexity.prompt.md +43 -26
- package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +44 -49
- package/src/orchestrator/prompts/brainstorm.prompt.md +2 -2
- package/src/orchestrator/prompts/bug-fix.prompt.md +5 -4
- package/src/orchestrator/prompts/create-skill.prompt.md +29 -39
- package/src/orchestrator/prompts/fix-convoy.prompt.md +43 -29
- package/src/orchestrator/prompts/fix-prd.prompt.md +26 -22
- package/src/orchestrator/prompts/generate-convoy.prompt.md +139 -147
- package/src/orchestrator/prompts/generate-prd.prompt.md +75 -68
- package/src/orchestrator/prompts/implement-feature.prompt.md +7 -6
- package/src/orchestrator/prompts/validate-convoy.prompt.md +29 -28
- package/src/orchestrator/prompts/validate-prd.prompt.md +28 -21
- package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +3 -3
- package/src/orchestrator/skills/agent-hooks/SKILL.md +1 -1
- package/src/orchestrator/skills/fast-review/SKILL.md +3 -1
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +7 -8
- package/dist/cli/convoy/dag-analysis.d.ts +0 -39
- package/dist/cli/convoy/dag-analysis.d.ts.map +0 -1
- package/dist/cli/convoy/dag-analysis.js +0 -279
- package/dist/cli/convoy/dag-analysis.js.map +0 -1
- package/dist/cli/convoy/dag-analysis.test.d.ts +0 -2
- package/dist/cli/convoy/dag-analysis.test.d.ts.map +0 -1
- package/dist/cli/convoy/dag-analysis.test.js +0 -289
- package/dist/cli/convoy/dag-analysis.test.js.map +0 -1
- package/dist/cli/convoy/formula.d.ts +0 -19
- package/dist/cli/convoy/formula.d.ts.map +0 -1
- package/dist/cli/convoy/formula.js +0 -142
- package/dist/cli/convoy/formula.js.map +0 -1
- package/dist/cli/convoy/formula.test.d.ts +0 -2
- package/dist/cli/convoy/formula.test.d.ts.map +0 -1
- package/dist/cli/convoy/formula.test.js +0 -342
- package/dist/cli/convoy/formula.test.js.map +0 -1
- package/dist/cli/convoy/health.d.ts +0 -34
- package/dist/cli/convoy/health.d.ts.map +0 -1
- package/dist/cli/convoy/health.js +0 -123
- package/dist/cli/convoy/health.js.map +0 -1
- package/dist/cli/convoy/health.test.d.ts +0 -2
- package/dist/cli/convoy/health.test.d.ts.map +0 -1
- package/dist/cli/convoy/health.test.js +0 -448
- package/dist/cli/convoy/health.test.js.map +0 -1
- package/dist/cli/convoy/last-run.d.ts +0 -53
- package/dist/cli/convoy/last-run.d.ts.map +0 -1
- package/dist/cli/convoy/last-run.js +0 -54
- package/dist/cli/convoy/last-run.js.map +0 -1
- package/dist/cli/convoy/last-run.test.d.ts +0 -2
- package/dist/cli/convoy/last-run.test.d.ts.map +0 -1
- package/dist/cli/convoy/last-run.test.js +0 -110
- package/dist/cli/convoy/last-run.test.js.map +0 -1
- package/dist/cli/convoy/pipeline.d.ts +0 -41
- package/dist/cli/convoy/pipeline.d.ts.map +0 -1
- package/dist/cli/convoy/pipeline.js +0 -414
- package/dist/cli/convoy/pipeline.js.map +0 -1
- package/dist/cli/convoy/pipeline.test.d.ts +0 -2
- package/dist/cli/convoy/pipeline.test.d.ts.map +0 -1
- package/dist/cli/convoy/pipeline.test.js +0 -837
- package/dist/cli/convoy/pipeline.test.js.map +0 -1
- package/dist/cli/convoy/review-stages.d.ts +0 -9
- package/dist/cli/convoy/review-stages.d.ts.map +0 -1
- package/dist/cli/convoy/review-stages.js +0 -134
- package/dist/cli/convoy/review-stages.js.map +0 -1
- package/dist/cli/convoy/review-stages.test.d.ts +0 -2
- package/dist/cli/convoy/review-stages.test.d.ts.map +0 -1
- package/dist/cli/convoy/review-stages.test.js +0 -197
- package/dist/cli/convoy/review-stages.test.js.map +0 -1
- package/dist/cli/run/executor.d.ts +0 -15
- package/dist/cli/run/executor.d.ts.map +0 -1
- package/dist/cli/run/executor.js +0 -249
- package/dist/cli/run/executor.js.map +0 -1
- package/dist/cli/run/executor.test.d.ts +0 -2
- package/dist/cli/run/executor.test.d.ts.map +0 -1
- package/dist/cli/run/executor.test.js +0 -297
- package/dist/cli/run/executor.test.js.map +0 -1
- package/dist/cli/run/reporter.d.ts +0 -10
- package/dist/cli/run/reporter.d.ts.map +0 -1
- package/dist/cli/run/reporter.js +0 -142
- package/dist/cli/run/reporter.js.map +0 -1
- package/dist/cli/run-dry-run.test.d.ts +0 -2
- package/dist/cli/run-dry-run.test.d.ts.map +0 -1
- package/dist/cli/run-dry-run.test.js +0 -83
- package/dist/cli/run-dry-run.test.js.map +0 -1
- package/dist/cli/run-executor-flags.test.d.ts +0 -2
- package/dist/cli/run-executor-flags.test.d.ts.map +0 -1
- package/dist/cli/run-executor-flags.test.js +0 -31
- package/dist/cli/run-executor-flags.test.js.map +0 -1
- package/dist/cli/run-finish.test.d.ts +0 -2
- package/dist/cli/run-finish.test.d.ts.map +0 -1
- package/dist/cli/run-finish.test.js +0 -77
- package/dist/cli/run-finish.test.js.map +0 -1
- package/dist/cli/watch.d.ts +0 -15
- package/dist/cli/watch.d.ts.map +0 -1
- package/dist/cli/watch.js +0 -277
- package/dist/cli/watch.js.map +0 -1
- package/dist/dashboard/scripts/etl.d.ts +0 -10
- package/dist/dashboard/scripts/etl.d.ts.map +0 -1
- package/dist/dashboard/scripts/etl.js +0 -141
- package/dist/dashboard/scripts/etl.js.map +0 -1
- package/src/cli/convoy/dag-analysis.test.ts +0 -349
- package/src/cli/convoy/dag-analysis.ts +0 -367
- package/src/cli/convoy/formula.test.ts +0 -404
- package/src/cli/convoy/formula.ts +0 -174
- package/src/cli/convoy/health.test.ts +0 -519
- package/src/cli/convoy/health.ts +0 -189
- package/src/cli/convoy/last-run.test.ts +0 -130
- package/src/cli/convoy/last-run.ts +0 -87
- package/src/cli/convoy/pipeline.test.ts +0 -999
- package/src/cli/convoy/pipeline.ts +0 -492
- package/src/cli/convoy/review-stages.test.ts +0 -235
- package/src/cli/convoy/review-stages.ts +0 -166
- package/src/cli/run/executor.test.ts +0 -338
- package/src/cli/run/executor.ts +0 -292
- package/src/cli/run/reporter.ts +0 -160
- package/src/cli/run-dry-run.test.ts +0 -97
- package/src/cli/run-executor-flags.test.ts +0 -38
- package/src/cli/run-finish.test.ts +0 -91
- package/src/cli/watch.ts +0 -295
- package/src/dashboard/astro.config.mjs +0 -6
- package/src/dashboard/dist/_astro/index.CADNhRPS.css +0 -1
- package/src/dashboard/dist/data/.gitkeep +0 -0
- package/src/dashboard/dist/data/convoy-list.json +0 -1
- package/src/dashboard/dist/data/overall-stats.json +0 -29
- package/src/dashboard/dist/index.html +0 -1963
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +0 -31
- package/src/dashboard/node_modules/.vite/deps/astro___aria-query.js +0 -6776
- package/src/dashboard/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
- package/src/dashboard/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
- package/src/dashboard/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
- package/src/dashboard/node_modules/.vite/deps/astro___cssesc.js +0 -99
- package/src/dashboard/node_modules/.vite/deps/astro___cssesc.js.map +0 -7
- package/src/dashboard/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
- package/src/dashboard/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
- package/src/dashboard/node_modules/.vite/deps/package.json +0 -3
- package/src/dashboard/package-lock.json +0 -6
- package/src/dashboard/public/data/.gitkeep +0 -0
- package/src/dashboard/public/data/convoy-list.json +0 -1
- package/src/dashboard/public/data/overall-stats.json +0 -29
- package/src/dashboard/public/icon-192.png +0 -0
- package/src/dashboard/scripts/etl.test.ts +0 -166
- package/src/dashboard/scripts/etl.ts +0 -170
- package/src/dashboard/scripts/generate-demo-db.test.ts +0 -30
- package/src/dashboard/scripts/generate-demo-db.ts +0 -529
- package/src/dashboard/scripts/integration-test.ts +0 -504
- package/src/dashboard/scripts/verify-demo-data.sh +0 -51
- package/src/dashboard/seed-data/delegations.ndjson +0 -35
- package/src/dashboard/seed-data/events.ndjson +0 -104
- package/src/dashboard/seed-data/panels.ndjson +0 -13
- package/src/dashboard/seed-data/reviews.ndjson +0 -6
- package/src/dashboard/seed-data/sessions.ndjson +0 -50
- package/src/dashboard/src/env.d.ts +0 -1
- package/src/dashboard/src/layouts/Layout.astro +0 -25
- package/src/dashboard/src/pages/index.astro +0 -2313
- package/src/dashboard/src/styles/dashboard.css +0 -2943
- package/src/dashboard/tsconfig.json +0 -6
- /package/src/{dashboard/dist → cli/dashboard}/icon-192.png +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Task } from './spec-types.js';
|
|
2
|
+
import type { TaskRecord } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Pure scheduling helpers: the plan-time phase split, and which ready tasks may
|
|
5
|
+
* start next to the ones already running.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Group tasks into phases by dependency depth (Kahn's algorithm).
|
|
9
|
+
*
|
|
10
|
+
* Phases are no longer barriers — the engine starts a task the moment its
|
|
11
|
+
* dependencies are done. They remain the unit of the plan-time partition
|
|
12
|
+
* check and the `phase` column the viewer groups by.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildPhases(tasks: Task[]): Task[][];
|
|
15
|
+
/** A duration for people: `850ms`, `12s`, `4m 12s`, `1h 3m`. */
|
|
16
|
+
export declare function formatDuration(ms: number): string;
|
|
17
|
+
/** The task's declared files, normalised; unparseable entries are kept verbatim. */
|
|
18
|
+
export declare function taskFiles(task: Pick<TaskRecord, 'files'>): string[];
|
|
19
|
+
/** True when two declared file lists share a path, or one contains the other. */
|
|
20
|
+
export declare function filesOverlap(a: string[], b: string[]): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Which of the ready tasks may start now, in order, given what is running and
|
|
23
|
+
* how many slots are free.
|
|
24
|
+
*
|
|
25
|
+
* A task whose files overlap a running task's waits — the dynamic form of the
|
|
26
|
+
* per-phase partition check, which only ever compared tasks in the same phase.
|
|
27
|
+
* Two tasks picked in the same call are checked against each other too.
|
|
28
|
+
*/
|
|
29
|
+
export declare function pickStartable(ready: TaskRecord[], running: TaskRecord[], freeSlots: number): TaskRecord[];
|
|
30
|
+
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/cli/convoy/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAG5C;;;GAGG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,CA6BnD;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAgBnE;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAG9D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,EAAE,UAAU,EAAE,EACrB,SAAS,EAAE,MAAM,GAChB,UAAU,EAAE,CAWd"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { normalizePath, pathsOverlap } from './partition.js';
|
|
2
|
+
/**
|
|
3
|
+
* Pure scheduling helpers: the plan-time phase split, and which ready tasks may
|
|
4
|
+
* start next to the ones already running.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Group tasks into phases by dependency depth (Kahn's algorithm).
|
|
8
|
+
*
|
|
9
|
+
* Phases are no longer barriers — the engine starts a task the moment its
|
|
10
|
+
* dependencies are done. They remain the unit of the plan-time partition
|
|
11
|
+
* check and the `phase` column the viewer groups by.
|
|
12
|
+
*/
|
|
13
|
+
export function buildPhases(tasks) {
|
|
14
|
+
const taskMap = new Map();
|
|
15
|
+
for (const t of tasks)
|
|
16
|
+
taskMap.set(t.id, t);
|
|
17
|
+
const inDegree = new Map();
|
|
18
|
+
const dependents = new Map();
|
|
19
|
+
for (const t of tasks) {
|
|
20
|
+
inDegree.set(t.id, (t.depends_on || []).filter((d) => taskMap.has(d)).length);
|
|
21
|
+
dependents.set(t.id, []);
|
|
22
|
+
}
|
|
23
|
+
for (const t of tasks) {
|
|
24
|
+
for (const dep of t.depends_on || [])
|
|
25
|
+
dependents.get(dep)?.push(t.id);
|
|
26
|
+
}
|
|
27
|
+
const phases = [];
|
|
28
|
+
const remaining = new Set(tasks.map((t) => t.id));
|
|
29
|
+
while (remaining.size > 0) {
|
|
30
|
+
const phase = [];
|
|
31
|
+
for (const id of remaining) {
|
|
32
|
+
if (inDegree.get(id) === 0)
|
|
33
|
+
phase.push(taskMap.get(id));
|
|
34
|
+
}
|
|
35
|
+
if (phase.length === 0)
|
|
36
|
+
throw new Error('Cannot resolve task order — possible circular dependency');
|
|
37
|
+
phases.push(phase);
|
|
38
|
+
for (const t of phase) {
|
|
39
|
+
remaining.delete(t.id);
|
|
40
|
+
for (const depId of dependents.get(t.id))
|
|
41
|
+
inDegree.set(depId, inDegree.get(depId) - 1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return phases;
|
|
45
|
+
}
|
|
46
|
+
/** A duration for people: `850ms`, `12s`, `4m 12s`, `1h 3m`. */
|
|
47
|
+
export function formatDuration(ms) {
|
|
48
|
+
if (ms < 1000)
|
|
49
|
+
return `${Math.max(0, Math.round(ms))}ms`;
|
|
50
|
+
const seconds = Math.floor(ms / 1000);
|
|
51
|
+
if (seconds < 60)
|
|
52
|
+
return `${seconds}s`;
|
|
53
|
+
const minutes = Math.floor(seconds / 60);
|
|
54
|
+
const remSec = seconds % 60;
|
|
55
|
+
if (minutes < 60)
|
|
56
|
+
return remSec > 0 ? `${minutes}m ${remSec}s` : `${minutes}m`;
|
|
57
|
+
const hours = Math.floor(minutes / 60);
|
|
58
|
+
const remMin = minutes % 60;
|
|
59
|
+
return remMin > 0 ? `${hours}h ${remMin}m` : `${hours}h`;
|
|
60
|
+
}
|
|
61
|
+
/** The task's declared files, normalised; unparseable entries are kept verbatim. */
|
|
62
|
+
export function taskFiles(task) {
|
|
63
|
+
if (!task.files)
|
|
64
|
+
return [];
|
|
65
|
+
let raw;
|
|
66
|
+
try {
|
|
67
|
+
raw = JSON.parse(task.files);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
if (!Array.isArray(raw))
|
|
73
|
+
return [];
|
|
74
|
+
return raw.filter((f) => typeof f === 'string').map((f) => {
|
|
75
|
+
try {
|
|
76
|
+
return normalizePath(f);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return f;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** True when two declared file lists share a path, or one contains the other. */
|
|
84
|
+
export function filesOverlap(a, b) {
|
|
85
|
+
if (a.length === 0 || b.length === 0)
|
|
86
|
+
return false;
|
|
87
|
+
return a.some((x) => b.some((y) => pathsOverlap(x, y) || pathsOverlap(x.toLowerCase(), y.toLowerCase())));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Which of the ready tasks may start now, in order, given what is running and
|
|
91
|
+
* how many slots are free.
|
|
92
|
+
*
|
|
93
|
+
* A task whose files overlap a running task's waits — the dynamic form of the
|
|
94
|
+
* per-phase partition check, which only ever compared tasks in the same phase.
|
|
95
|
+
* Two tasks picked in the same call are checked against each other too.
|
|
96
|
+
*/
|
|
97
|
+
export function pickStartable(ready, running, freeSlots) {
|
|
98
|
+
const picked = [];
|
|
99
|
+
const busy = running.map(taskFiles);
|
|
100
|
+
for (const task of ready) {
|
|
101
|
+
if (picked.length >= freeSlots)
|
|
102
|
+
break;
|
|
103
|
+
const files = taskFiles(task);
|
|
104
|
+
if (busy.some((other) => filesOverlap(files, other)))
|
|
105
|
+
continue;
|
|
106
|
+
picked.push(task);
|
|
107
|
+
busy.push(files);
|
|
108
|
+
}
|
|
109
|
+
return picked;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/cli/convoy/schedule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE5D;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IACvC,KAAK,MAAM,CAAC,IAAI,KAAK;QA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KAAmB,EACnB,OAAqB,EACrB,SAAiB;IAEjB,MAAM,MAAM,GAAiB,EAAE,CAAA;IAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACnC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,MAAM,IAAI,SAAS;YAAE,MAAK;QACrC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAAE,SAAQ;QAC9D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.test.d.ts","sourceRoot":"","sources":["../../../src/cli/convoy/schedule.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { buildPhases, filesOverlap, formatDuration, pickStartable, taskFiles } from './schedule.js';
|
|
3
|
+
const rec = (id, files = []) => ({ id, files: files.length ? JSON.stringify(files) : null });
|
|
4
|
+
const task = (id, depends_on = []) => ({ id, depends_on });
|
|
5
|
+
describe('buildPhases', () => {
|
|
6
|
+
it('groups tasks by dependency depth', () => {
|
|
7
|
+
const phases = buildPhases([task('a'), task('b', ['a']), task('c'), task('d', ['b', 'c'])]);
|
|
8
|
+
expect(phases.map(p => p.map(t => t.id))).toEqual([['a', 'c'], ['b'], ['d']]);
|
|
9
|
+
});
|
|
10
|
+
it('throws on a cycle', () => {
|
|
11
|
+
expect(() => buildPhases([task('a', ['b']), task('b', ['a'])])).toThrow(/circular/);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
describe('pickStartable', () => {
|
|
15
|
+
it('fills the free slots in order', () => {
|
|
16
|
+
expect(pickStartable([rec('a'), rec('b'), rec('c')], [], 2).map(t => t.id)).toEqual(['a', 'b']);
|
|
17
|
+
});
|
|
18
|
+
it('holds back a task whose files overlap a running one, and lets the next one through', () => {
|
|
19
|
+
const picked = pickStartable([rec('b', ['src/api.ts']), rec('c', ['docs/'])], [rec('a', ['src/'])], 2);
|
|
20
|
+
expect(picked.map(t => t.id)).toEqual(['c']);
|
|
21
|
+
});
|
|
22
|
+
it('checks two picks against each other too', () => {
|
|
23
|
+
const picked = pickStartable([rec('a', ['x.ts']), rec('b', ['x.ts']), rec('c', ['y.ts'])], [], 3);
|
|
24
|
+
expect(picked.map(t => t.id)).toEqual(['a', 'c']);
|
|
25
|
+
});
|
|
26
|
+
it('never blocks tasks that declare no files', () => {
|
|
27
|
+
expect(pickStartable([rec('b')], [rec('a', ['src/'])], 1).map(t => t.id)).toEqual(['b']);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
describe('helpers', () => {
|
|
31
|
+
it('normalises declared files', () => {
|
|
32
|
+
expect(taskFiles(rec('a', ['./src/a.ts', 'src\\b.ts']))).toEqual(['src/a.ts', 'src/b.ts']);
|
|
33
|
+
});
|
|
34
|
+
it('treats a directory as overlapping the files under it, in either case', () => {
|
|
35
|
+
expect(filesOverlap(['src/'], ['src/x.ts'])).toBe(true);
|
|
36
|
+
expect(filesOverlap(['README.md'], ['readme.md'])).toBe(true);
|
|
37
|
+
expect(filesOverlap(['a.ts'], ['b.ts'])).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
it('formats durations', () => {
|
|
40
|
+
expect(formatDuration(850)).toBe('850ms');
|
|
41
|
+
expect(formatDuration(252_000)).toBe('4m 12s');
|
|
42
|
+
expect(formatDuration(3_780_000)).toBe('1h 3m');
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=schedule.test.js.map
|
|
@@ -0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YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC7D,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACtD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACzC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9C,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The planner's task plan, and the spec built from it.
|
|
3
|
+
*
|
|
4
|
+
* The LLM decides only what it is good at: the tasks, their prompts, who does
|
|
5
|
+
* them, what they touch and what waits for what. Everything that decides how
|
|
6
|
+
* the run behaves — branch, runtime, concurrency, failure policy, the checks —
|
|
7
|
+
* is set here from facts the code can read, so a generated spec is safe and
|
|
8
|
+
* fast without anyone editing it.
|
|
9
|
+
*/
|
|
10
|
+
/** One task as the planner writes it. */
|
|
2
11
|
export interface TaskPlanTask {
|
|
3
12
|
id: string;
|
|
4
13
|
agent?: string;
|
|
@@ -10,17 +19,11 @@ export interface TaskPlanTask {
|
|
|
10
19
|
review?: string;
|
|
11
20
|
complexity?: 1 | 2 | 3 | 5 | 8 | 13;
|
|
12
21
|
prompt: string;
|
|
13
|
-
gates?: string[];
|
|
14
|
-
built_in_gates?: Record<string, boolean | string>;
|
|
15
22
|
}
|
|
23
|
+
/** The planner's whole answer. */
|
|
16
24
|
export interface TaskPlan {
|
|
17
25
|
name: string;
|
|
18
|
-
branch?: string;
|
|
19
|
-
concurrency?: number | 'auto';
|
|
20
|
-
on_failure?: 'continue' | 'stop';
|
|
21
26
|
tasks: TaskPlanTask[];
|
|
22
|
-
gates?: string[];
|
|
23
|
-
gate_retries?: number;
|
|
24
27
|
}
|
|
25
28
|
/** A patch to apply to a task plan — output of the fix-convoy prompt */
|
|
26
29
|
export interface TaskPatch {
|
|
@@ -28,32 +31,118 @@ export interface TaskPatch {
|
|
|
28
31
|
field: string;
|
|
29
32
|
value: unknown;
|
|
30
33
|
}
|
|
31
|
-
/**
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
detect_drift?: boolean;
|
|
41
|
-
built_in_gates?: Record<string, boolean | string>;
|
|
42
|
-
max_concurrent_reviews?: number;
|
|
34
|
+
/** What the code, not the planner, decides about a run. */
|
|
35
|
+
export interface SpecSettings {
|
|
36
|
+
/** The runtime that planned it; run, resume and retry stay on it. */
|
|
37
|
+
adapter: string;
|
|
38
|
+
/** Where the work lands. Never the user's checkout. */
|
|
39
|
+
branch: string;
|
|
40
|
+
/** Project checks, run once after every task is merged. */
|
|
41
|
+
gates: string[];
|
|
43
42
|
}
|
|
43
|
+
/** More agents at once than this costs more in rate limits and machine load than it saves. */
|
|
44
|
+
export declare const MAX_PLANNED_CONCURRENCY = 4;
|
|
45
|
+
export declare function slugify(name: string): string;
|
|
46
|
+
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
47
|
+
/**
|
|
48
|
+
* The package manager a project uses: its `packageManager` field (what
|
|
49
|
+
* corepack honours), else its lockfile, else npm.
|
|
50
|
+
*/
|
|
51
|
+
export declare function detectPackageManager(projectRoot: string): PackageManager;
|
|
52
|
+
/**
|
|
53
|
+
* The project's own checks, from its package.json scripts.
|
|
54
|
+
*
|
|
55
|
+
* They run once, after every task has merged, which is the only point at which
|
|
56
|
+
* they test the combined result. The planner used to choose gates itself and
|
|
57
|
+
* the spec builder added a per-task `npm test` once a plan passed five tasks:
|
|
58
|
+
* the whole suite, once per task, mostly against the same code.
|
|
59
|
+
*/
|
|
60
|
+
export declare function detectGates(projectRoot: string): string[];
|
|
61
|
+
/**
|
|
62
|
+
* How many tasks to run at once: the widest level of the plan, capped.
|
|
63
|
+
*
|
|
64
|
+
* A fixed 2 left wide plans waiting and gave a straight chain a slot it could
|
|
65
|
+
* never use.
|
|
66
|
+
*/
|
|
67
|
+
export declare function planConcurrency(plan: TaskPlan): number;
|
|
44
68
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
69
|
+
* Converts a TaskPlan into convoy YAML.
|
|
70
|
+
*
|
|
71
|
+
* Defaults that changed, and why:
|
|
72
|
+
* - `branch: convoy/<slug>`. Without one the engine merged into whatever was
|
|
73
|
+
* checked out, and resume of a branchless run crashed.
|
|
74
|
+
* - `on_failure: continue`. `stop` switched off every per-task retry and still
|
|
75
|
+
* let the rest of the wave run; with `continue` a failure blocks only what
|
|
76
|
+
* depends on it, and resume picks it up.
|
|
77
|
+
* - `adapter`, so a resumed run cannot land on a different runtime.
|
|
78
|
+
* - No `detect_drift`, and no built-in gates: drift asked a fresh session with
|
|
79
|
+
* no memory to grade work it never saw and re-ran tasks on its guess, and the
|
|
80
|
+
* built-in gates either repeated the full suite per task or read a diff that
|
|
81
|
+
* was not committed yet.
|
|
82
|
+
* - `gate_retries: 1` when there are gates: one agent attempt to fix a failing
|
|
83
|
+
* check on the merged result, rather than a finished run reported red over a
|
|
84
|
+
* lint error.
|
|
47
85
|
*/
|
|
48
|
-
export declare function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
86
|
+
export declare function buildConvoyYaml(plan: TaskPlan, settings: SpecSettings): string;
|
|
87
|
+
/**
|
|
88
|
+
* Every `files` entry as a concrete path or directory.
|
|
89
|
+
*
|
|
90
|
+
* The engine refuses a glob, and refused it only after the run had been
|
|
91
|
+
* recorded. A glob is reduced to the directory in front of its first wildcard
|
|
92
|
+
* (`src/**\/*.ts` → `src/`), which claims at least what the glob did. One with
|
|
93
|
+
* no directory in front (`*.md`) would claim the whole project, so it is
|
|
94
|
+
* dropped and reported instead.
|
|
95
|
+
*/
|
|
96
|
+
export declare function normalizePlanFiles(plan: TaskPlan): {
|
|
97
|
+
plan: TaskPlan;
|
|
98
|
+
notes: string[];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Fold a task that only writes tests for one other task into that task.
|
|
102
|
+
*
|
|
103
|
+
* Planners split work into "write the code" and "test the code" even when told
|
|
104
|
+
* not to: three real runs did it every time. Each split is another session,
|
|
105
|
+
* review and merge, and the agent that wrote the code never runs a test against
|
|
106
|
+
* it. A task folds in when every file it owns is a test file, it depends on
|
|
107
|
+
* exactly one task, nothing else claims its files, and that task is not itself
|
|
108
|
+
* test-only. Tasks that waited on it wait on the merged task instead.
|
|
109
|
+
*/
|
|
110
|
+
export declare function foldTestOnlyTasks(plan: TaskPlan): {
|
|
111
|
+
plan: TaskPlan;
|
|
112
|
+
folded: Array<[string, string]>;
|
|
113
|
+
};
|
|
114
|
+
export declare function checkPlan(plan: TaskPlan, settings: SpecSettings): string[];
|
|
115
|
+
/**
|
|
116
|
+
* Make the later of each conflicting pair wait for the earlier.
|
|
117
|
+
*
|
|
118
|
+
* The last resort, after fix-convoy has had its rounds: it costs parallelism,
|
|
119
|
+
* never correctness, and it cannot create a cycle — an edge is only added
|
|
120
|
+
* between two tasks that do not yet wait for each other in either direction.
|
|
121
|
+
*/
|
|
122
|
+
export declare function sequenceConflicts(plan: TaskPlan): {
|
|
123
|
+
plan: TaskPlan;
|
|
124
|
+
added: Array<[string, string]>;
|
|
125
|
+
};
|
|
126
|
+
export interface GroupPlan {
|
|
127
|
+
name: string;
|
|
128
|
+
depends_on: string[];
|
|
129
|
+
plan: TaskPlan;
|
|
130
|
+
}
|
|
53
131
|
/**
|
|
54
|
-
*
|
|
132
|
+
* One plan from the plans written for each group of a large feature.
|
|
133
|
+
*
|
|
134
|
+
* Groups used to become a chain of separate specs run one after another, even
|
|
135
|
+
* when the assessment said two of them were independent. Here a group's first
|
|
136
|
+
* tasks wait for the last tasks of every group it depends on, and nothing else
|
|
137
|
+
* is added: independent groups run side by side under the normal scheduler,
|
|
138
|
+
* and the user gets one spec, one plan to read and one run to resume.
|
|
139
|
+
*
|
|
140
|
+
* Two groups can both name a task `setup`. The later one is renamed
|
|
141
|
+
* `<group>-setup`, with its group's references to it.
|
|
142
|
+
*
|
|
143
|
+
* `groups` must come in dependency order (topologicalSortGroups).
|
|
55
144
|
*/
|
|
56
|
-
export declare function
|
|
145
|
+
export declare function mergeGroupPlans(name: string, groups: GroupPlan[]): TaskPlan;
|
|
57
146
|
/**
|
|
58
147
|
* Applies an array of patches to a task plan. Returns a new TaskPlan (immutable).
|
|
59
148
|
*/
|
|
@@ -70,7 +159,8 @@ export interface ParseTaskPlanResult {
|
|
|
70
159
|
*/
|
|
71
160
|
export declare function parseTaskPlan(jsonText: string): TaskPlan | null;
|
|
72
161
|
/**
|
|
73
|
-
* Like parseTaskPlan but returns a diagnostic reason on failure
|
|
162
|
+
* Like parseTaskPlan but returns a diagnostic reason on failure, for the caller
|
|
163
|
+
* to report.
|
|
74
164
|
*/
|
|
75
165
|
export declare function parseTaskPlanWithReason(jsonText: string): ParseTaskPlanResult;
|
|
76
166
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-builder.d.ts","sourceRoot":"","sources":["../../../src/cli/convoy/spec-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec-builder.d.ts","sourceRoot":"","sources":["../../../src/cli/convoy/spec-builder.ts"],"names":[],"mappings":"AAOA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,K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