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
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Convoy Telemetry Model
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The events the convoy engine (experimental) records, and how its concepts map
|
|
4
|
+
to [OpenTelemetry](https://opentelemetry.io/) semantics. OpenCastle does not
|
|
5
|
+
export OpenTelemetry; the mapping is for anyone writing an exporter.
|
|
4
6
|
|
|
5
7
|
## Conceptual Mapping
|
|
6
8
|
|
|
7
9
|
| Convoy Concept | OTel Concept | ID Field | Description |
|
|
8
10
|
|---------------|-------------|----------|-------------|
|
|
9
|
-
| **Convoy** | Trace | `convoy_id` → `trace_id` |
|
|
11
|
+
| **Convoy** | Trace | `convoy_id` → `trace_id` | One run of a `.convoy.yml` spec, including its resumes |
|
|
10
12
|
| **Task** | Span | `task_id` → `span_id` | One unit of work within a convoy |
|
|
11
13
|
| **TaskStep** | Sub-span | `step_index` | Sequential steps within a multi-step task |
|
|
12
14
|
| **Event** | Log / SpanEvent | `type` | Structured occurrence during execution |
|
|
@@ -15,187 +17,193 @@ How Convoy concepts map to [OpenTelemetry](https://opentelemetry.io/) semantics.
|
|
|
15
17
|
### ID Correlation
|
|
16
18
|
|
|
17
19
|
```
|
|
18
|
-
trace_id = convoy_id (
|
|
19
|
-
span_id = task_id
|
|
20
|
-
worker_id =
|
|
20
|
+
trace_id = convoy_id (convoy-<start time in ms>, set when the run starts)
|
|
21
|
+
span_id = task_id (unique within the convoy, from the spec)
|
|
22
|
+
worker_id = one attempt at a task: <run>-<task>-<sequence>, also the name of its worktree
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
Every event carries `convoy_id`, `task_id
|
|
25
|
+
Every event carries `convoy_id`, `task_id` and `worker_id`, each nullable.
|
|
26
|
+
`worker_id` is set on `task_started`, `task_done`, and `task_failed` once a
|
|
27
|
+
worktree exists; other task events carry the task only.
|
|
24
28
|
|
|
25
29
|
## Storage
|
|
26
30
|
|
|
27
|
-
- **Primary**: SQLite (
|
|
28
|
-
- **Supplementary**: NDJSON (
|
|
31
|
+
- **Primary**: SQLite (`.opencastle/convoy.db`) — durable, queryable, crash-safe
|
|
32
|
+
- **Supplementary**: NDJSON, one file per convoy (`.opencastle/logs/convoys/<convoy-id>.ndjson`) — append-only log for streaming/grep
|
|
29
33
|
|
|
30
|
-
SQLite is the source of truth.
|
|
34
|
+
SQLite is the source of truth. On resume, `recoverNdjson()` truncates a partial
|
|
35
|
+
last line and replays the SQLite events missing from the NDJSON file.
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
Event data is masked for secrets before either copy is written
|
|
38
|
+
([`redact.ts`](redact.ts)); a masked value adds a `secret_leak_prevented` event
|
|
39
|
+
with `context: event_redacted`.
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
These are separate from the agent log, `.opencastle/logs/events.ndjson`, which
|
|
42
|
+
`opencastle log` appends to and validates against its
|
|
43
|
+
[schema](../../orchestrator/customizations/logs/README.md).
|
|
35
44
|
|
|
36
|
-
|
|
37
|
-
- **Throughput**: Not suitable for >10,000 events/second workloads.
|
|
38
|
-
- **Crash-safety**: Every event is fsynced before the engine continues, so a crash never loses the last event.
|
|
45
|
+
### Write Strategy
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
NDJSON writes use synchronous `appendFileSync` + `fsyncSync` per event, so every
|
|
48
|
+
event is on disk before the engine continues. At ~1–2 ms per event this is
|
|
49
|
+
negligible for a run's few hundred events. A failed NDJSON write is recorded in
|
|
50
|
+
SQLite as `ndjson_write_failed`.
|
|
41
51
|
|
|
42
52
|
## Event Type Reference
|
|
43
53
|
|
|
44
|
-
All 39
|
|
54
|
+
All 39 event types in `KNOWN_EVENT_TYPES` ([`types.ts`](types.ts)), with the data
|
|
55
|
+
fields the engine writes. The shapes are checked by
|
|
56
|
+
[`event-schemas.ts`](event-schemas.ts). Unless noted, the source is
|
|
57
|
+
`convoy/engine.ts` (relative to `src/cli/`).
|
|
58
|
+
|
|
59
|
+
Several types come only from parts of a spec that are off unless the spec asks
|
|
60
|
+
for them; the **When** column says which.
|
|
45
61
|
|
|
46
62
|
### Convoy Lifecycle
|
|
47
63
|
|
|
48
|
-
| Event Type |
|
|
49
|
-
|
|
50
|
-
| `convoy_started` |
|
|
51
|
-
| `convoy_finished` |
|
|
52
|
-
| `convoy_failed` |
|
|
53
|
-
| `
|
|
64
|
+
| Event Type | Data Fields | When |
|
|
65
|
+
|-----------|-------------|------|
|
|
66
|
+
| `convoy_started` | `name: string; branch: string; base: string \| null; concurrency: number` | A run starts |
|
|
67
|
+
| `convoy_finished` | `status: 'done'` | Every task done and every gate passed |
|
|
68
|
+
| `convoy_failed` | `status: 'failed' \| 'gate-failed'; reason: string` | A task not done (`"<n> task(s) not done"`), a gate failed (`"Gate check failed"`), or the engine crashed (`"engine crashed: …"`) |
|
|
69
|
+
| `convoy_interrupted` | `signal: 'SIGINT' \| 'SIGTERM' \| 'abort'; requeued: string[]` | Ctrl+C or SIGTERM; `requeued` are the tasks put back to pending |
|
|
70
|
+
| `convoy_resumed` | `original_created_at: string; reset: string[]` | `convoy resume`; `reset` are the tasks put back to pending |
|
|
71
|
+
| `convoy_guard` | `passed: boolean; warnings: string[]` | The end-of-run consistency check found something: a task left non-terminal, fewer log lines than finished tasks, fewer `task_started` events than retries, or totals not stored |
|
|
54
72
|
|
|
55
73
|
### Task Lifecycle
|
|
56
74
|
|
|
57
|
-
| Event Type |
|
|
58
|
-
|
|
59
|
-
| `task_started` |
|
|
60
|
-
| `task_done` |
|
|
61
|
-
| `task_failed` |
|
|
62
|
-
| `task_skipped` |
|
|
63
|
-
| `task_retried` |
|
|
64
|
-
| `
|
|
75
|
+
| Event Type | Data Fields | When |
|
|
76
|
+
|-----------|-------------|------|
|
|
77
|
+
| `task_started` | `worker_id: string; mechanism: 'worktree'; adapter: string; attempt: number` | An attempt starts in its worktree |
|
|
78
|
+
| `task_done` | `exit_code: number; worker_id: string; tokens: number \| null; cost_usd: number \| null; estimated: boolean; model: string \| null` | The task finished and its work merged. `tokens` and `cost_usd` cover every attempt; `cost_usd` includes its review |
|
|
79
|
+
| `task_failed` | `reason: string; message: string; gate?: string; hook?: string; exit_code?: number; worker_id?: string` | A task failed for good. `reason` is one of `error`, `timeout`, `gate-failed`, `no-op`, `review-blocked`, `merge-failed`, `worktree`, `commit`, `adapter`, `hook-failed`, `secret-in-prompt`, `missing-input`, `symlink-escape`, `symlink-escape-post`, `engine-error` |
|
|
80
|
+
| `task_skipped` | `reason: string` | A dependency failed or never finished, the run stopped dispatching, or a circuit breaker is open with no fallback |
|
|
81
|
+
| `task_retried` | `previous_status: string; reason?: string; attempt?: number` | A failed attempt goes back to pending with its reason (`reason`, `attempt`), or `convoy resume` resets the task (`previous_status` only) |
|
|
82
|
+
| `task_merged` | `branch: string; files: number` | The task's commit merged into the convoy branch; `files` is how many it changed |
|
|
65
83
|
|
|
66
84
|
### Review & Disputes
|
|
67
85
|
|
|
68
|
-
| Event Type |
|
|
69
|
-
|
|
70
|
-
| `review_started` |
|
|
71
|
-
| `review_verdict` |
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
|
|
75
|
-
### Drift Detection
|
|
76
|
-
|
|
77
|
-
| Event Type | Source | Data Fields |
|
|
78
|
-
|-----------|--------|-------------|
|
|
79
|
-
| `drift_check_result` | engine.ts | `score?: number; threshold?: number; passed?: boolean` |
|
|
80
|
-
| `drift_detected` | engine.ts | `score?: number; files?: string[]` |
|
|
86
|
+
| Event Type | Data Fields | When |
|
|
87
|
+
|-----------|-------------|------|
|
|
88
|
+
| `review_started` | `level: 'fast' \| 'panel'; task_id: string; model: string` | A reviewer starts. `model` is the model it is asked for: the spec's `reviewer_model`, else the runtime's economy-tier model (`haiku` on Claude Code), else `runtime default` for a runtime with no tier models |
|
|
89
|
+
| `review_verdict` | `level: string; verdict: 'pass' \| 'block'; tokens: number; model: string \| null; feedback_length: number; passes?: number; blocks?: number` | A verdict. `level: 'auto-pass'` with 0 tokens means no reviewer ran; `passes` and `blocks` are set for a panel |
|
|
90
|
+
| `review_skipped` | `level: string; reason: string` | A review was due and reached no verdict (the runtime cannot run read-only, the reviewer failed, timed out or gave no verdict, or the review budget is spent). Never recorded as a pass |
|
|
91
|
+
| `dispute_opened` | `dispute_id: string; task_id: string; agent: string; panel_attempts: number; reason: string` | `review: panel` blocked the task three times; also written to `.opencastle/DISPUTES.md` |
|
|
92
|
+
| `dlq_entry_created` | `dlq_id: string; task_id: string; agent: string; attempts: number` | A task failed for good; its record goes to the `dlq` table and `.opencastle/AGENT-FAILURES.md` |
|
|
81
93
|
|
|
82
94
|
### Circuit Breaker
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|-----------|--------|-------------|
|
|
86
|
-
| `circuit_breaker_tripped` | engine.ts | `agent?: string; failure_count?: number; threshold?: number` |
|
|
87
|
-
| `circuit_breaker_fallback` | engine.ts | `original_agent?: string; fallback_agent?: string; task_id?: string` |
|
|
88
|
-
| `circuit_breaker_blocked` | engine.ts | `agent?: string; task_id?: string` |
|
|
96
|
+
Only when the spec sets `defaults.circuit_breaker`.
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
| Event Type | Data Fields | When |
|
|
99
|
+
|-----------|-------------|------|
|
|
100
|
+
| `circuit_breaker_tripped` | `agent: string; failure_count: number` | An agent reached the failure threshold (default 3) |
|
|
101
|
+
| `circuit_breaker_fallback` | `original_agent: string; fallback_agent: string; task_id: string` | A task's agent is in cooldown and the named `fallback_agent` is not; the task runs as the fallback agent |
|
|
102
|
+
| `circuit_breaker_blocked` | `agent: string; task_id: string` | A task's agent is in cooldown and no fallback can take it (none named, or the fallback is in cooldown too); the task is skipped |
|
|
91
103
|
|
|
92
|
-
|
|
93
|
-
|-----------|--------|-------------|
|
|
94
|
-
| `merge_conflict_detected` | engine.ts | `task_id?: string; files?: string[]` |
|
|
95
|
-
| `merge_conflict_failed` | engine.ts | `task_id?: string; error?: string` |
|
|
104
|
+
### Merge
|
|
96
105
|
|
|
97
|
-
|
|
106
|
+
| Event Type | Data Fields | When |
|
|
107
|
+
|-----------|-------------|------|
|
|
108
|
+
| `merge_conflict_detected` | `attempt: number; conflicting_files: string[]` | A merge into the convoy branch conflicted. The task re-runs once from the current tip if it has a retry left |
|
|
109
|
+
| `merge_failed` | `branch: string; error: string; conflicting_files?: string[]` | The merge did not land; the task fails and its worker branch (`branch`) is kept |
|
|
98
110
|
|
|
99
|
-
|
|
100
|
-
|-----------|--------|-------------|
|
|
101
|
-
| `file_injection_received` | engine.ts | `task_id?: string; from_task?: string; name?: string` |
|
|
102
|
-
| `artifact_limit_reached` | engine.ts | `task_id?: string; limit?: number; current?: number` |
|
|
111
|
+
### Gates
|
|
103
112
|
|
|
104
|
-
|
|
113
|
+
| Event Type | Data Fields | When |
|
|
114
|
+
|-----------|-------------|------|
|
|
115
|
+
| `gate_result` | `command: string; passed: boolean; exit_code: number; scope: 'task' \| 'convoy'; output?: string` | A spec gate ran: a task's own `gates` in its worktree (`scope: task`), or the spec's `gates` once on the merged result (`scope: convoy`, with the last 2,000 characters of output when it failed) |
|
|
116
|
+
| `built_in_gate_result` | `gate: string; passed: boolean; output: string; level?: string` | `no_op` (on by default; recorded only when it fails), and, when the spec turns them on under `defaults.built_in_gates`, `secret_scan`, `blast_radius` (with `level`) and `browser_test` per task, and `regression_test` and `dependency_audit` once at the end |
|
|
105
117
|
|
|
106
|
-
|
|
107
|
-
|-----------|--------|-------------|
|
|
108
|
-
| `agent_identity_captured` | engine.ts | `agent?: string; task_id?: string` |
|
|
109
|
-
| `agent_identity_rejected` | engine.ts | `agent?: string; task_id?: string; reason?: string` |
|
|
110
|
-
| `swarm_concurrency_update` | engine.ts | `new_concurrency?: number; reason?: string` |
|
|
118
|
+
### Contracts & Partitions
|
|
111
119
|
|
|
112
|
-
|
|
120
|
+
| Event Type | Data Fields | When |
|
|
121
|
+
|-----------|-------------|------|
|
|
122
|
+
| `contract_violation` | `task_id: string; agent: string; missing: string[]; warnings: string[]` | The agent's answer lacks the output summary its role asks for. A warning; the work is kept |
|
|
123
|
+
| `partition_violation` | `task_id: string; allowed: string[]; actual: string[]; violations: string[]` | The task changed files outside its `files`. A warning; the work is kept |
|
|
113
124
|
|
|
114
|
-
|
|
115
|
-
|-----------|--------|-------------|
|
|
116
|
-
| `post_convoy_hook_failed` | engine.ts | `hook?: string; error?: string` |
|
|
125
|
+
### TDD Gate
|
|
117
126
|
|
|
118
|
-
|
|
127
|
+
Only when the spec sets `defaults.built_in_gates.tdd_check`.
|
|
119
128
|
|
|
120
|
-
| Event Type |
|
|
121
|
-
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
129
|
+
| Event Type | Data Fields | When |
|
|
130
|
+
|-----------|-------------|------|
|
|
131
|
+
| `tdd_check_passed` | `task_id: string; new_source_files: number; existing_test_files: number` | Every new source file has a test |
|
|
132
|
+
| `tdd_check_failed` | `task_id: string; missing_test_files: string[]; new_source_files: number` | A new source file has no test; fails the attempt in `mode: block`, the default |
|
|
133
|
+
| `tdd_check_skipped` | `task_id: string; reason: string; agent: string` | `reason` is `exempt_agent` (by default `writer` and `researcher`) or `disabled` |
|
|
124
134
|
|
|
125
|
-
###
|
|
135
|
+
### Artifacts & Agent Memory
|
|
126
136
|
|
|
127
|
-
| Event Type |
|
|
128
|
-
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
137
|
+
| Event Type | Data Fields | When |
|
|
138
|
+
|-----------|-------------|------|
|
|
139
|
+
| `artifact_limit_reached` | `task_id: string; limit: 50` | A task declared `outputs` and the convoy already holds 50 artifacts |
|
|
140
|
+
| `artifacts_extracted` | `task_id: string; count: number; artifacts: Array<{ filename: string; summary?: string }>` | The agent's answer referenced files under `.opencastle/artifacts/<convoy-id>/` |
|
|
141
|
+
| `agent_identity_captured` | `agent: string; task_id: string` | A task with `persistent: true` finished; the end of its answer is kept for the agent's next task |
|
|
142
|
+
| `agent_identity_rejected` | `agent: string; task_id: string; reason: 'secrets_detected'` | The same, but the summary held a secret, so it was not kept |
|
|
131
143
|
|
|
132
|
-
###
|
|
133
|
-
|
|
134
|
-
| Event Type | Source | Data Fields |
|
|
135
|
-
|-----------|--------|-------------|
|
|
136
|
-
| `built_in_gate_result` | engine.ts | `gate: string; passed: boolean; output?: string; level?: string` |
|
|
144
|
+
### Hooks
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
| Event Type | Data Fields | When |
|
|
147
|
+
|-----------|-------------|------|
|
|
148
|
+
| `post_convoy_hook_failed` | `hook: string; error: string` | A spec-level `post_convoy` hook failed |
|
|
139
149
|
|
|
140
|
-
|
|
141
|
-
|-----------|--------|-------------|
|
|
142
|
-
| `watch_started` | watch.ts | `trigger_type?: string; pid?: number` |
|
|
143
|
-
| `watch_cycle_start` | watch.ts | `cycle_number?: number; triggered_by?: string` |
|
|
144
|
-
| `watch_cycle_end` | watch.ts | `cycle_number?: number; status?: string` |
|
|
145
|
-
| `watch_stopped` | watch.ts | `reason?: string` |
|
|
150
|
+
### Sessions
|
|
146
151
|
|
|
147
|
-
|
|
152
|
+
| Event Type | Data Fields | When |
|
|
153
|
+
|-----------|-------------|------|
|
|
154
|
+
| `session` | `agent: string; model: string \| null; task: string; outcome: 'success' \| 'failed'; duration_min: number; files_changed: number; retries: number; convoy_id: string` | A task finished, either way |
|
|
155
|
+
| `delegation` | `session_id: string; agent: string; model: string \| null; tier: string; mechanism: 'convoy'; outcome: 'success' \| 'failed'; retries: number; phase: number; convoy_id: string` | Beside every `session` |
|
|
148
156
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
| `worker_killed` | health.ts | `reason?: string; worker_id?: string; task_id?: string` |
|
|
157
|
+
`opencastle log` writes its own `session` and `delegation` records to the agent
|
|
158
|
+
log, `.opencastle/logs/events.ndjson`, not to a convoy's events.
|
|
152
159
|
|
|
153
|
-
###
|
|
160
|
+
### Security & Reliability
|
|
154
161
|
|
|
155
|
-
| Event Type |
|
|
156
|
-
|
|
162
|
+
| Event Type | Data Fields | When |
|
|
163
|
+
|-----------|-------------|------|
|
|
164
|
+
| `secret_leak_prevented` | `task_id?: string; findings_count?: number; patterns: string[]; context: string; original_type?: string` | A secret was found and masked or withheld. `context` is `prompt` (the task was not sent to the agent), `dlq_redacted` or `dlq_dual_write` (a failure record), `dispute_markdown_write`, or `event_redacted` (from `convoy/events.ts`, with `original_type`) |
|
|
165
|
+
| `ndjson_write_failed` | `original_type: string` | Writing an event to the NDJSON file failed (from `convoy/events.ts`) |
|
|
166
|
+
| `worker_killed` | `reason: 'interrupted'; task_id: string` | Ctrl+C or SIGTERM stopped a running agent session |
|
|
157
167
|
|
|
158
168
|
## Derived Metrics
|
|
159
169
|
|
|
160
|
-
|
|
170
|
+
Computed from raw events, not emitted directly.
|
|
161
171
|
|
|
162
172
|
| Metric | Derivation |
|
|
163
173
|
|--------|-----------|
|
|
164
|
-
| Task duration | `task_done.timestamp
|
|
165
|
-
|
|
|
166
|
-
| Retry rate | `COUNT(task_retried) / COUNT(task_started)` |
|
|
167
|
-
| Gate failure rate |
|
|
168
|
-
| Review pass rate | `COUNT(review_verdict WHERE verdict='pass') / COUNT(review_verdict)` |
|
|
169
|
-
|
|
|
170
|
-
|
|
|
174
|
+
| Task duration | `task_done.timestamp` − the task's last `task_started.timestamp` |
|
|
175
|
+
| Run duration | the final `convoy_finished` / `convoy_failed` / `convoy_interrupted` − `convoy_started` (a resume adds a `convoy_resumed`) |
|
|
176
|
+
| Retry rate | `COUNT(task_retried WHERE reason)` / `COUNT(task_started)` |
|
|
177
|
+
| Gate failure rate | failed / all, over `gate_result` and `built_in_gate_result` |
|
|
178
|
+
| Review pass rate | `COUNT(review_verdict WHERE verdict='pass')` / (`COUNT(review_verdict)` + `COUNT(review_skipped)`) |
|
|
179
|
+
| Tokens | `SUM(task_done.tokens)` + `SUM(review_verdict.tokens)`; the run's total in `convoy.total_tokens` also counts a gate-fix attempt |
|
|
180
|
+
| Cost | `SUM(task_done.cost_usd)`; `estimated: true` marks a figure not reported by the runtime |
|
|
171
181
|
|
|
172
182
|
## Runtime Validation
|
|
173
183
|
|
|
174
|
-
- `validateEventType(type)` — checks membership in `KNOWN_EVENT_TYPES` (a `Set<string>` exported from [`types.ts`](types.ts)). Unknown types trigger a `console.warn` but do not throw
|
|
175
|
-
- `validateEventData(type, data)` — validates the `data` payload shape for known event types
|
|
184
|
+
- `validateEventType(type)` — checks membership in `KNOWN_EVENT_TYPES` (a `Set<string>` exported from [`types.ts`](types.ts)). Unknown types trigger a `console.warn` but do not throw.
|
|
185
|
+
- `validateEventData(type, data)` — validates the `data` payload shape for known event types, in [`event-schemas.ts`](event-schemas.ts). Returns `{ valid: boolean; issues?: string[] }`. Invalid payloads trigger a `console.warn` but do not block emission. The schemas allow extra fields, which is how `session`, `delegation` and `dispute_opened` carry theirs.
|
|
176
186
|
|
|
177
187
|
Both validators are called at emit time in [`events.ts`](events.ts).
|
|
178
188
|
|
|
179
|
-
##
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
The ETL script gracefully handles missing databases — it produces empty JSON files so the dashboard renders an empty state instead of crashing.
|
|
189
|
+
## Viewing events
|
|
190
|
+
|
|
191
|
+
`opencastle convoy dashboard` (experimental) is the Observability dashboard: a
|
|
192
|
+
read-only page over a project's runs, tasks and events in `.opencastle/convoy.db`,
|
|
193
|
+
read through [`read-model.ts`](read-model.ts). Beside the task and run rows, its
|
|
194
|
+
panels count these events, and nothing else:
|
|
195
|
+
|
|
196
|
+
| Panel | Events |
|
|
197
|
+
|-------|--------|
|
|
198
|
+
| Tier Distribution | `delegation` (`tier`, the latest per task) |
|
|
199
|
+
| Delegation Mechanism | `task_started` (`mechanism`, `adapter`) |
|
|
200
|
+
| Quality / Review, Fast Reviews, Panel Reviews | `review_verdict` (an `auto-pass` counted apart from reviews that ran), `review_skipped`, `dispute_opened`; the attempt is the `attempt` of the task's latest `task_started` |
|
|
201
|
+
| Checks | `gate_result`, `built_in_gate_result`; `contract_violation` and `partition_violation` as warnings; `secret_leak_prevented` |
|
|
202
|
+
| Reliability | `task_retried`, `task_failed` (the failure reason); the `dlq` table |
|
|
203
|
+
| Outputs & Artifacts | `task_merged` (`files`); the `artifact` table |
|
|
204
|
+
| Execution Log | `task_started`, `task_retried`, `worker_killed` |
|
|
205
|
+
| Recent Sessions | `session`, beside the `opencastle log` records in `.opencastle/logs/events.ndjson`, each labelled with where it came from |
|
|
206
|
+
| Event Timeline | every event, grouped by `eventCategory` in [`read-model.ts`](read-model.ts) |
|
|
207
|
+
|
|
208
|
+
Working on the dashboard itself is described in
|
|
209
|
+
[CONTRIBUTING.md](../../../CONTRIBUTING.md#the-dashboard).
|
|
@@ -108,12 +108,14 @@ describe('artifacts', () => {
|
|
|
108
108
|
expect(refs).toHaveLength(2)
|
|
109
109
|
})
|
|
110
110
|
|
|
111
|
-
it('
|
|
111
|
+
it('drops a reference to a missing artifact without writing to stderr', () => {
|
|
112
|
+
// The engine owns the terminal while it runs; a stray stderr line breaks its status line.
|
|
112
113
|
const stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true)
|
|
113
114
|
const output = '[ARTIFACT: missing.md] A report that does not exist on disk'
|
|
114
115
|
const refs = extractArtifactRefs('task-1', 'convoy-1', output)
|
|
115
116
|
expect(refs).toHaveLength(0)
|
|
116
|
-
expect(stderrSpy).
|
|
117
|
+
expect(stderrSpy).not.toHaveBeenCalled()
|
|
118
|
+
stderrSpy.mockRestore()
|
|
117
119
|
})
|
|
118
120
|
|
|
119
121
|
it('returns empty array when no artifact patterns found', () => {
|
|
@@ -76,8 +76,8 @@ export function writeArtifact(
|
|
|
76
76
|
return { task_id: taskId, convoy_id: convoyId, filename: safeFilename, type, size_bytes, summary, path: filePath }
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function listArtifacts(convoyId: string, taskId: string): ArtifactRef[] {
|
|
80
|
-
const dir = getArtifactDir(convoyId, taskId)
|
|
79
|
+
export function listArtifacts(convoyId: string, taskId: string, basePath?: string): ArtifactRef[] {
|
|
80
|
+
const dir = getArtifactDir(convoyId, taskId, basePath)
|
|
81
81
|
if (!existsSync(dir)) return []
|
|
82
82
|
|
|
83
83
|
const refs: ArtifactRef[] = []
|
|
@@ -111,7 +111,14 @@ export function readArtifact(ref: ArtifactRef): string {
|
|
|
111
111
|
return readFileSync(ref.path, 'utf8')
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* The artifacts an agent's answer points at that actually exist.
|
|
116
|
+
*
|
|
117
|
+
* A reference to a missing file is dropped rather than reported on stderr: the
|
|
118
|
+
* engine prints a status line on the same terminal, and the answer itself is
|
|
119
|
+
* stored for anyone who wants to see what the agent claimed.
|
|
120
|
+
*/
|
|
121
|
+
export function extractArtifactRefs(taskId: string, convoyId: string, output: string, basePath?: string): ArtifactRef[] {
|
|
115
122
|
const pattern = /\[ARTIFACT:\s*([^\]]+)\]\s*(.+)/g
|
|
116
123
|
const refs: ArtifactRef[] = []
|
|
117
124
|
let match: RegExpExecArray | null
|
|
@@ -121,18 +128,12 @@ export function extractArtifactRefs(taskId: string, convoyId: string, output: st
|
|
|
121
128
|
const filename = basename(match[1].trim())
|
|
122
129
|
const summary = match[2].trim()
|
|
123
130
|
|
|
124
|
-
if (!filename || filename === '..')
|
|
125
|
-
process.stderr.write('[artifacts] Warning: invalid artifact filename from agent output\n')
|
|
126
|
-
continue
|
|
127
|
-
}
|
|
131
|
+
if (!filename || filename === '..') continue
|
|
128
132
|
|
|
129
|
-
const dir = getArtifactDir(convoyId, taskId)
|
|
133
|
+
const dir = getArtifactDir(convoyId, taskId, basePath)
|
|
130
134
|
const filePath = join(dir, filename)
|
|
131
135
|
|
|
132
|
-
if (!existsSync(filePath))
|
|
133
|
-
process.stderr.write(`[artifacts] Warning: referenced artifact not found: ${filePath}\n`)
|
|
134
|
-
continue
|
|
135
|
-
}
|
|
136
|
+
if (!existsSync(filePath)) continue
|
|
136
137
|
|
|
137
138
|
refs.push({ task_id: taskId, filename, summary, path: filePath })
|
|
138
139
|
}
|