agent-pipeline 0.1.0 → 0.1.2
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/CLAUDE.md +4 -3
- package/{license → LICENSE} +1 -1
- package/README.md +120 -55
- package/dist/cli/commands/agent/info.js +1 -1
- package/dist/cli/commands/agent/info.js.map +1 -1
- package/dist/cli/commands/agent/list.js +1 -1
- package/dist/cli/commands/agent/list.js.map +1 -1
- package/dist/cli/commands/agent/pull.d.ts +1 -0
- package/dist/cli/commands/agent/pull.d.ts.map +1 -1
- package/dist/cli/commands/agent/pull.js +67 -44
- package/dist/cli/commands/agent/pull.js.map +1 -1
- package/dist/cli/commands/cleanup.d.ts +4 -0
- package/dist/cli/commands/cleanup.d.ts.map +1 -1
- package/dist/cli/commands/cleanup.js +197 -37
- package/dist/cli/commands/cleanup.js.map +1 -1
- package/dist/cli/commands/history.d.ts.map +1 -1
- package/dist/cli/commands/history.js +3 -22
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/hooks.d.ts +10 -0
- package/dist/cli/commands/hooks.d.ts.map +1 -0
- package/dist/cli/commands/hooks.js +88 -0
- package/dist/cli/commands/hooks.js.map +1 -0
- package/dist/cli/commands/init.d.ts +1 -6
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +169 -88
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/loop-context.d.ts +2 -0
- package/dist/cli/commands/loop-context.d.ts.map +1 -0
- package/dist/cli/commands/loop-context.js +88 -0
- package/dist/cli/commands/loop-context.js.map +1 -0
- package/dist/cli/commands/pipeline/create.d.ts.map +1 -1
- package/dist/cli/commands/pipeline/create.js +156 -68
- package/dist/cli/commands/pipeline/create.js.map +1 -1
- package/dist/cli/commands/run.d.ts +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +29 -5
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +9 -0
- package/dist/cli/commands/schema.d.ts.map +1 -0
- package/dist/cli/commands/schema.js +541 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +0 -6
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/help/index.d.ts +6 -0
- package/dist/cli/help/index.d.ts.map +1 -0
- package/dist/cli/help/index.js +538 -0
- package/dist/cli/help/index.js.map +1 -0
- package/dist/cli/help/types.d.ts +22 -0
- package/dist/cli/help/types.d.ts.map +1 -0
- package/dist/cli/help/types.js +2 -0
- package/dist/cli/help/types.js.map +1 -0
- package/dist/cli/hooks.d.ts +5 -1
- package/dist/cli/hooks.d.ts.map +1 -1
- package/dist/cli/hooks.js +106 -12
- package/dist/cli/hooks.js.map +1 -1
- package/dist/cli/templates/agents/code-review-agents/code-reviewer.md +46 -0
- package/dist/cli/templates/agents/code-review-agents/memory-doc-updater.md +189 -0
- package/dist/cli/templates/agents/code-review-agents/quality-checker.md +52 -0
- package/dist/cli/templates/agents/frontend-agents/brutalist_purist.md +563 -0
- package/dist/cli/templates/agents/frontend-agents/cyberpunk_hacker.md +824 -0
- package/dist/cli/templates/agents/frontend-agents/frontend-pipeline-ref.md +32 -0
- package/dist/cli/templates/agents/frontend-agents/indie_game_dev.md +715 -0
- package/dist/cli/templates/agents/frontend-agents/luxury_editorial.md +628 -0
- package/dist/cli/templates/agents/frontend-agents/product_owner.md +159 -0
- package/dist/cli/templates/agents/frontend-agents/retro_90s_webmaster.md +385 -0
- package/dist/cli/templates/agents/frontend-agents/showcase.md +362 -0
- package/dist/cli/templates/agents/frontend-agents/swiss_modernist.md +716 -0
- package/dist/cli/templates/agents/loop-agents/socratic-explorer.md +91 -0
- package/dist/cli/templates/instructions/handover.md +40 -0
- package/dist/cli/templates/instructions/loop.md +39 -0
- package/dist/cli/templates/pipelines/front-end-parallel-example.yml +81 -0
- package/dist/cli/templates/pipelines/loop-example.yml +25 -0
- package/dist/cli/templates/pipelines/post-commit-example.yml +49 -58
- package/dist/cli/templates/schema/pipeline-config.schema.json +400 -0
- package/dist/cli/templates/schema/pipeline-config.schema.yaml +302 -0
- package/dist/cli/utils/agent-importer.d.ts +1 -0
- package/dist/cli/utils/agent-importer.d.ts.map +1 -1
- package/dist/cli/utils/agent-importer.js +67 -0
- package/dist/cli/utils/agent-importer.js.map +1 -1
- package/dist/cli/utils/interactive-prompts.d.ts +4 -0
- package/dist/cli/utils/interactive-prompts.d.ts.map +1 -1
- package/dist/cli/utils/interactive-prompts.js +59 -13
- package/dist/cli/utils/interactive-prompts.js.map +1 -1
- package/dist/config/pipeline-loader.d.ts +4 -1
- package/dist/config/pipeline-loader.d.ts.map +1 -1
- package/dist/config/pipeline-loader.js +58 -0
- package/dist/config/pipeline-loader.js.map +1 -1
- package/dist/config/schema.d.ts +64 -35
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/abort-controller.d.ts +16 -0
- package/dist/core/abort-controller.d.ts.map +1 -0
- package/dist/core/abort-controller.js +52 -0
- package/dist/core/abort-controller.js.map +1 -0
- package/dist/core/agent-query-runner.d.ts +0 -1
- package/dist/core/agent-query-runner.d.ts.map +1 -1
- package/dist/core/agent-query-runner.js +0 -22
- package/dist/core/agent-query-runner.js.map +1 -1
- package/dist/core/agent-runtimes/claude-code-headless-runtime.d.ts +5 -1
- package/dist/core/agent-runtimes/claude-code-headless-runtime.d.ts.map +1 -1
- package/dist/core/agent-runtimes/claude-code-headless-runtime.js +127 -12
- package/dist/core/agent-runtimes/claude-code-headless-runtime.js.map +1 -1
- package/dist/core/agent-runtimes/claude-sdk-runtime.d.ts +0 -2
- package/dist/core/agent-runtimes/claude-sdk-runtime.d.ts.map +1 -1
- package/dist/core/agent-runtimes/claude-sdk-runtime.js +1 -22
- package/dist/core/agent-runtimes/claude-sdk-runtime.js.map +1 -1
- package/dist/core/agent-runtimes/codex-headless-runtime.d.ts +27 -0
- package/dist/core/agent-runtimes/codex-headless-runtime.d.ts.map +1 -0
- package/dist/core/agent-runtimes/codex-headless-runtime.js +623 -0
- package/dist/core/agent-runtimes/codex-headless-runtime.js.map +1 -0
- package/dist/core/agent-runtimes/openai-compatible-runtime.d.ts +17 -0
- package/dist/core/agent-runtimes/openai-compatible-runtime.d.ts.map +1 -0
- package/dist/core/agent-runtimes/openai-compatible-runtime.js +231 -0
- package/dist/core/agent-runtimes/openai-compatible-runtime.js.map +1 -0
- package/dist/core/branch-manager.d.ts +3 -1
- package/dist/core/branch-manager.d.ts.map +1 -1
- package/dist/core/branch-manager.js +11 -1
- package/dist/core/branch-manager.js.map +1 -1
- package/dist/core/git-manager.d.ts +17 -1
- package/dist/core/git-manager.d.ts.map +1 -1
- package/dist/core/git-manager.js +147 -3
- package/dist/core/git-manager.js.map +1 -1
- package/dist/core/group-execution-orchestrator.d.ts +4 -13
- package/dist/core/group-execution-orchestrator.d.ts.map +1 -1
- package/dist/core/group-execution-orchestrator.js +53 -142
- package/dist/core/group-execution-orchestrator.js.map +1 -1
- package/dist/core/handover-manager.d.ts +24 -0
- package/dist/core/handover-manager.d.ts.map +1 -0
- package/dist/core/handover-manager.js +214 -0
- package/dist/core/handover-manager.js.map +1 -0
- package/dist/core/instruction-loader.d.ts +23 -0
- package/dist/core/instruction-loader.d.ts.map +1 -0
- package/dist/core/instruction-loader.js +123 -0
- package/dist/core/instruction-loader.js.map +1 -0
- package/dist/core/loop-state-manager.d.ts +12 -7
- package/dist/core/loop-state-manager.d.ts.map +1 -1
- package/dist/core/loop-state-manager.js +49 -3
- package/dist/core/loop-state-manager.js.map +1 -1
- package/dist/core/parallel-executor.d.ts +8 -3
- package/dist/core/parallel-executor.d.ts.map +1 -1
- package/dist/core/parallel-executor.js +90 -16
- package/dist/core/parallel-executor.js.map +1 -1
- package/dist/core/pipeline-finalizer.d.ts +12 -4
- package/dist/core/pipeline-finalizer.d.ts.map +1 -1
- package/dist/core/pipeline-finalizer.js +244 -33
- package/dist/core/pipeline-finalizer.js.map +1 -1
- package/dist/core/pipeline-initializer.d.ts +13 -5
- package/dist/core/pipeline-initializer.d.ts.map +1 -1
- package/dist/core/pipeline-initializer.js +53 -25
- package/dist/core/pipeline-initializer.js.map +1 -1
- package/dist/core/pipeline-runner.d.ts +15 -1
- package/dist/core/pipeline-runner.d.ts.map +1 -1
- package/dist/core/pipeline-runner.js +434 -64
- package/dist/core/pipeline-runner.js.map +1 -1
- package/dist/core/pr-creator.d.ts +0 -1
- package/dist/core/pr-creator.d.ts.map +1 -1
- package/dist/core/pr-creator.js +12 -4
- package/dist/core/pr-creator.js.map +1 -1
- package/dist/core/stage-executor.d.ts +19 -11
- package/dist/core/stage-executor.d.ts.map +1 -1
- package/dist/core/stage-executor.js +151 -178
- package/dist/core/stage-executor.js.map +1 -1
- package/dist/core/types/agent-runtime.d.ts +3 -2
- package/dist/core/types/agent-runtime.d.ts.map +1 -1
- package/dist/core/worktree-manager.d.ts +21 -0
- package/dist/core/worktree-manager.d.ts.map +1 -0
- package/dist/core/worktree-manager.js +133 -0
- package/dist/core/worktree-manager.js.map +1 -0
- package/dist/index.js +147 -112
- package/dist/index.js.map +1 -1
- package/dist/notifications/notification-manager.d.ts +1 -0
- package/dist/notifications/notification-manager.d.ts.map +1 -1
- package/dist/notifications/notification-manager.js +17 -3
- package/dist/notifications/notification-manager.js.map +1 -1
- package/dist/notifications/notifiers/local-notifier.d.ts.map +1 -1
- package/dist/notifications/notifiers/local-notifier.js +5 -2
- package/dist/notifications/notifiers/local-notifier.js.map +1 -1
- package/dist/notifications/notifiers/slack-notifier.d.ts.map +1 -1
- package/dist/notifications/notifiers/slack-notifier.js +39 -8
- package/dist/notifications/notifiers/slack-notifier.js.map +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/ui/components/execution-group.d.ts.map +1 -1
- package/dist/ui/components/execution-group.js +1 -1
- package/dist/ui/components/execution-group.js.map +1 -1
- package/dist/ui/components/interactive-summary.d.ts +9 -0
- package/dist/ui/components/interactive-summary.d.ts.map +1 -0
- package/dist/ui/components/interactive-summary.js +166 -0
- package/dist/ui/components/interactive-summary.js.map +1 -0
- package/dist/ui/components/keyboard-hints.d.ts +12 -0
- package/dist/ui/components/keyboard-hints.d.ts.map +1 -0
- package/dist/ui/components/keyboard-hints.js +13 -0
- package/dist/ui/components/keyboard-hints.js.map +1 -0
- package/dist/ui/components/live-timer.d.ts +9 -0
- package/dist/ui/components/live-timer.d.ts.map +1 -0
- package/dist/ui/components/live-timer.js +25 -0
- package/dist/ui/components/live-timer.js.map +1 -0
- package/dist/ui/components/loop-iteration-history.d.ts +8 -0
- package/dist/ui/components/loop-iteration-history.d.ts.map +1 -0
- package/dist/ui/components/loop-iteration-history.js +106 -0
- package/dist/ui/components/loop-iteration-history.js.map +1 -0
- package/dist/ui/components/loop-session-summary.d.ts +9 -0
- package/dist/ui/components/loop-session-summary.d.ts.map +1 -0
- package/dist/ui/components/loop-session-summary.js +39 -0
- package/dist/ui/components/loop-session-summary.js.map +1 -0
- package/dist/ui/components/stage-row.d.ts +0 -1
- package/dist/ui/components/stage-row.d.ts.map +1 -1
- package/dist/ui/components/stage-row.js +5 -15
- package/dist/ui/components/stage-row.js.map +1 -1
- package/dist/ui/components/status-badge.d.ts.map +1 -1
- package/dist/ui/components/status-badge.js +1 -0
- package/dist/ui/components/status-badge.js.map +1 -1
- package/dist/ui/pipeline-ui.d.ts +1 -0
- package/dist/ui/pipeline-ui.d.ts.map +1 -1
- package/dist/ui/pipeline-ui.js +22 -18
- package/dist/ui/pipeline-ui.js.map +1 -1
- package/dist/utils/error-factory.d.ts.map +1 -1
- package/dist/utils/error-factory.js +10 -2
- package/dist/utils/error-factory.js.map +1 -1
- package/dist/utils/pipeline-formatter.d.ts +8 -2
- package/dist/utils/pipeline-formatter.d.ts.map +1 -1
- package/dist/utils/pipeline-formatter.js +30 -26
- package/dist/utils/pipeline-formatter.js.map +1 -1
- package/dist/utils/pipeline-logger.d.ts +19 -0
- package/dist/utils/pipeline-logger.d.ts.map +1 -0
- package/dist/utils/pipeline-logger.js +80 -0
- package/dist/utils/pipeline-logger.js.map +1 -0
- package/dist/utils/platform-opener.d.ts +4 -0
- package/dist/utils/platform-opener.d.ts.map +1 -0
- package/dist/utils/platform-opener.js +52 -0
- package/dist/utils/platform-opener.js.map +1 -0
- package/dist/validators/agent-validator.d.ts +10 -0
- package/dist/validators/agent-validator.d.ts.map +1 -0
- package/dist/validators/agent-validator.js +87 -0
- package/dist/validators/agent-validator.js.map +1 -0
- package/dist/validators/dag-validator.d.ts +9 -0
- package/dist/validators/dag-validator.d.ts.map +1 -0
- package/dist/validators/dag-validator.js +51 -0
- package/dist/validators/dag-validator.js.map +1 -0
- package/dist/validators/environment-validator.d.ts +9 -0
- package/dist/validators/environment-validator.d.ts.map +1 -0
- package/dist/validators/environment-validator.js +35 -0
- package/dist/validators/environment-validator.js.map +1 -0
- package/dist/validators/execution-validator.d.ts +8 -0
- package/dist/validators/execution-validator.d.ts.map +1 -0
- package/dist/validators/execution-validator.js +51 -0
- package/dist/validators/execution-validator.js.map +1 -0
- package/dist/validators/git-validator.d.ts +13 -0
- package/dist/validators/git-validator.d.ts.map +1 -0
- package/dist/validators/git-validator.js +135 -0
- package/dist/validators/git-validator.js.map +1 -0
- package/dist/validators/notification-validator.d.ts +8 -0
- package/dist/validators/notification-validator.d.ts.map +1 -0
- package/dist/validators/notification-validator.js +27 -0
- package/dist/validators/notification-validator.js.map +1 -0
- package/dist/validators/pipeline-validator.d.ts +3 -26
- package/dist/validators/pipeline-validator.d.ts.map +1 -1
- package/dist/validators/pipeline-validator.js +5 -515
- package/dist/validators/pipeline-validator.js.map +1 -1
- package/dist/validators/retry-validator.d.ts +9 -0
- package/dist/validators/retry-validator.d.ts.map +1 -0
- package/dist/validators/retry-validator.js +34 -0
- package/dist/validators/retry-validator.js.map +1 -0
- package/dist/validators/runtime-validator.d.ts +9 -0
- package/dist/validators/runtime-validator.d.ts.map +1 -0
- package/dist/validators/runtime-validator.js +82 -0
- package/dist/validators/runtime-validator.js.map +1 -0
- package/dist/validators/structure-validator.d.ts +8 -0
- package/dist/validators/structure-validator.d.ts.map +1 -0
- package/dist/validators/structure-validator.js +39 -0
- package/dist/validators/structure-validator.js.map +1 -0
- package/dist/validators/types.d.ts +19 -0
- package/dist/validators/types.d.ts.map +1 -0
- package/dist/validators/types.js +2 -0
- package/dist/validators/types.js.map +1 -0
- package/dist/validators/validation-orchestrator.d.ts +9 -0
- package/dist/validators/validation-orchestrator.d.ts.map +1 -0
- package/dist/validators/validation-orchestrator.js +43 -0
- package/dist/validators/validation-orchestrator.js.map +1 -0
- package/package.json +18 -12
- package/dist/cli/commands/install.d.ts +0 -2
- package/dist/cli/commands/install.d.ts.map +0 -1
- package/dist/cli/commands/install.js +0 -15
- package/dist/cli/commands/install.js.map +0 -1
- package/dist/cli/commands/uninstall.d.ts +0 -2
- package/dist/cli/commands/uninstall.d.ts.map +0 -1
- package/dist/cli/commands/uninstall.js +0 -6
- package/dist/cli/commands/uninstall.js.map +0 -1
- package/dist/cli/templates/agents/cleanup-reporter.md +0 -107
- package/dist/cli/templates/agents/code-reducer.md +0 -51
- package/dist/cli/templates/agents/code-reviewer.md +0 -34
- package/dist/cli/templates/agents/context-reducer.md +0 -94
- package/dist/cli/templates/agents/dependency-auditor.md +0 -127
- package/dist/cli/templates/agents/detective-empath.md +0 -26
- package/dist/cli/templates/agents/detective-linguist.md +0 -26
- package/dist/cli/templates/agents/detective-logician.md +0 -26
- package/dist/cli/templates/agents/detective-skeptic.md +0 -26
- package/dist/cli/templates/agents/detective-statistician.md +0 -26
- package/dist/cli/templates/agents/doc-updater.md +0 -30
- package/dist/cli/templates/agents/judge.md +0 -27
- package/dist/cli/templates/agents/memory-updater.md +0 -72
- package/dist/cli/templates/agents/quality-checker.md +0 -32
- package/dist/cli/templates/agents/security-auditor.md +0 -32
- package/dist/cli/templates/agents/storyteller.md +0 -26
- package/dist/cli/templates/agents/summary.md +0 -32
- package/dist/cli/templates/agents/synthesizer.md +0 -26
- package/dist/cli/templates/pipelines/large-pipeline-example.yml +0 -178
- package/dist/cli/templates/pipelines/post-merge-example.yml +0 -78
- package/dist/cli/templates/pipelines/pre-commit-example.yml +0 -41
- package/dist/cli/templates/pipelines/pre-push-example.yml +0 -51
- package/dist/cli/templates/pipelines/test-pipeline.yml +0 -90
- package/dist/config/project-config-loader.d.ts +0 -11
- package/dist/config/project-config-loader.d.ts.map +0 -1
- package/dist/config/project-config-loader.js +0 -100
- package/dist/config/project-config-loader.js.map +0 -1
- package/dist/core/condition-evaluator.d.ts +0 -16
- package/dist/core/condition-evaluator.d.ts.map +0 -1
- package/dist/core/condition-evaluator.js +0 -121
- package/dist/core/condition-evaluator.js.map +0 -1
- package/dist/core/context-reducer.d.ts +0 -15
- package/dist/core/context-reducer.d.ts.map +0 -1
- package/dist/core/context-reducer.js +0 -224
- package/dist/core/context-reducer.js.map +0 -1
- package/dist/core/output-storage-manager.d.ts +0 -14
- package/dist/core/output-storage-manager.d.ts.map +0 -1
- package/dist/core/output-storage-manager.js +0 -68
- package/dist/core/output-storage-manager.js.map +0 -1
- package/dist/core/output-tool-builder.d.ts +0 -6
- package/dist/core/output-tool-builder.d.ts.map +0 -1
- package/dist/core/output-tool-builder.js +0 -50
- package/dist/core/output-tool-builder.js.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AgentRuntimeRegistry } from '../core/agent-runtime-registry.js';
|
|
2
|
+
export class RuntimeValidator {
|
|
3
|
+
name = 'runtime';
|
|
4
|
+
priority = 0;
|
|
5
|
+
shouldRun(context) {
|
|
6
|
+
return !!context.config.runtime || context.config.agents?.some((a) => a.runtime) || false;
|
|
7
|
+
}
|
|
8
|
+
async validate(context) {
|
|
9
|
+
const { config, errors } = context;
|
|
10
|
+
if (config.runtime) {
|
|
11
|
+
await this.validateRuntimeConfig(errors, 'runtime', config.runtime, config.execution?.permissionMode);
|
|
12
|
+
}
|
|
13
|
+
if (config.agents) {
|
|
14
|
+
for (const agent of config.agents) {
|
|
15
|
+
if (agent.runtime) {
|
|
16
|
+
await this.validateRuntimeConfig(errors, `agents.${agent.name}.runtime`, agent.runtime, config.execution?.permissionMode);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async validateRuntimeConfig(errors, field, runtime, permissionMode) {
|
|
22
|
+
if (!AgentRuntimeRegistry.hasRuntime(runtime.type)) {
|
|
23
|
+
const availableRuntimes = AgentRuntimeRegistry.getAvailableTypes().join(', ');
|
|
24
|
+
errors.push({
|
|
25
|
+
field,
|
|
26
|
+
message: `Unknown runtime type: ${runtime.type}. Available runtimes: [${availableRuntimes}]`,
|
|
27
|
+
severity: 'error',
|
|
28
|
+
});
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const runtimeInstance = AgentRuntimeRegistry.getRuntime(runtime.type);
|
|
32
|
+
const capabilities = runtimeInstance.getCapabilities();
|
|
33
|
+
try {
|
|
34
|
+
const validation = await runtimeInstance.validate();
|
|
35
|
+
for (const error of validation.errors) {
|
|
36
|
+
errors.push({
|
|
37
|
+
field,
|
|
38
|
+
message: `Runtime availability: ${error}`,
|
|
39
|
+
severity: 'warning',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
for (const warning of validation.warnings) {
|
|
43
|
+
errors.push({
|
|
44
|
+
field,
|
|
45
|
+
message: warning,
|
|
46
|
+
severity: 'warning',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
errors.push({
|
|
52
|
+
field,
|
|
53
|
+
message: `Runtime validation failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
54
|
+
severity: 'warning',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const model = runtime.options?.model;
|
|
58
|
+
if (model && typeof model === 'string' && capabilities.availableModels.length > 0) {
|
|
59
|
+
if (!capabilities.availableModels.includes(model.toLowerCase())) {
|
|
60
|
+
const availableModels = capabilities.availableModels.join(', ');
|
|
61
|
+
errors.push({
|
|
62
|
+
field: `${field}.options.model`,
|
|
63
|
+
message: `Model "${model}" not available for runtime "${runtime.type}". Available models: [${availableModels}]`,
|
|
64
|
+
severity: 'error',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const runtimePermissionMode = runtime.options?.permissionMode;
|
|
69
|
+
const effectivePermissionMode = runtimePermissionMode || permissionMode;
|
|
70
|
+
if (effectivePermissionMode) {
|
|
71
|
+
if (!capabilities.permissionModes.includes(effectivePermissionMode)) {
|
|
72
|
+
const availableModes = capabilities.permissionModes.join(', ');
|
|
73
|
+
errors.push({
|
|
74
|
+
field: `${field}.options.permissionMode`,
|
|
75
|
+
message: `Permission mode "${effectivePermissionMode}" not supported by runtime "${runtime.type}". Supported modes: [${availableModes}]`,
|
|
76
|
+
severity: 'error',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=runtime-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-validator.js","sourceRoot":"","sources":["../../src/validators/runtime-validator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAMzE,MAAM,OAAO,gBAAgB;IAClB,IAAI,GAAG,SAAS,CAAC;IACjB,QAAQ,GAAG,CAAU,CAAC;IAE/B,SAAS,CAAC,OAA0B;QAClC,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACvC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;Q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uBAAuB,GAAG,qBAAqB,IAAI,cAAc,CAAC;QAExE,IAAI,uBAAuB,EAAE,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBACpE,MAAM,cAAc,GAAG,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/D,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,GAAG,KAAK,yBAAyB;oBACxC,OAAO,EAAE,oBAAoB,uBAAuB,+BAA+B,OAAO,CAAC,IAAI,wBAAwB,cAAc,GAAG;oBACxI,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Validator, ValidationContext } from './types.js';
|
|
2
|
+
export declare class StructureValidator implements Validator {
|
|
3
|
+
readonly name = "structure";
|
|
4
|
+
readonly priority: 0;
|
|
5
|
+
shouldRun(): boolean;
|
|
6
|
+
validate(context: ValidationContext): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=structure-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structure-validator.d.ts","sourceRoot":"","sources":["../../src/validators/structure-validator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK1D,qBAAa,kBAAmB,YAAW,SAAS;IAClD,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,QAAQ,EAAG,CAAC,CAAU;IAE/B,SAAS,IAAI,OAAO;IAId,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAiC1D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export class StructureValidator {
|
|
2
|
+
name = 'structure';
|
|
3
|
+
priority = 0;
|
|
4
|
+
shouldRun() {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
async validate(context) {
|
|
8
|
+
const { config, errors } = context;
|
|
9
|
+
if (!config.name || config.name.trim() === '') {
|
|
10
|
+
errors.push({
|
|
11
|
+
field: 'name',
|
|
12
|
+
message: 'Pipeline name is required',
|
|
13
|
+
severity: 'error',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (!config.trigger) {
|
|
17
|
+
errors.push({
|
|
18
|
+
field: 'trigger',
|
|
19
|
+
message: 'Pipeline trigger is required (manual or post-commit)',
|
|
20
|
+
severity: 'error',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else if (!['manual', 'post-commit'].includes(config.trigger)) {
|
|
24
|
+
errors.push({
|
|
25
|
+
field: 'trigger',
|
|
26
|
+
message: `Invalid trigger: ${config.trigger}. Must be 'manual' or 'post-commit'`,
|
|
27
|
+
severity: 'error',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (!config.agents || config.agents.length === 0) {
|
|
31
|
+
errors.push({
|
|
32
|
+
field: 'agents',
|
|
33
|
+
message: 'Pipeline must have at least one agent',
|
|
34
|
+
severity: 'error',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=structure-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structure-validator.js","sourceRoot":"","sources":["../../src/validators/structure-validator.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,kBAAkB;IACpB,IAAI,GAAG,WAAW,CAAC;IACnB,QAAQ,GAAG,CAAU,CAAC;IAE/B,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACvC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAEnC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,sDAAsD;gBAC/D,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/D,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,oBAAoB,MAAM,CAAC,OAAO,qCAAqC;gBAChF,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjD,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,QAAQ;gBACf,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PipelineConfig } from '../config/schema.js';
|
|
2
|
+
export interface ValidationError {
|
|
3
|
+
field: string;
|
|
4
|
+
message: string;
|
|
5
|
+
severity: 'error' | 'warning';
|
|
6
|
+
}
|
|
7
|
+
export interface ValidationContext {
|
|
8
|
+
config: PipelineConfig;
|
|
9
|
+
repoPath: string;
|
|
10
|
+
errors: ValidationError[];
|
|
11
|
+
skipRemainingValidators?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface Validator {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly priority: 0 | 1 | 2;
|
|
16
|
+
shouldRun(context: ValidationContext): boolean;
|
|
17
|
+
validate(context: ValidationContext): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validators/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAKD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAMD,MAAM,WAAW,SAAS;IAExB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAM7B,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAM/C,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/validators/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipelineConfig } from '../config/schema.js';
|
|
2
|
+
import { ValidationError, Validator } from './types.js';
|
|
3
|
+
export declare class ValidationOrchestrator {
|
|
4
|
+
private validators;
|
|
5
|
+
constructor();
|
|
6
|
+
register(validator: Validator): void;
|
|
7
|
+
validate(config: PipelineConfig, repoPath: string): Promise<ValidationError[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=validation-orchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-orchestrator.d.ts","sourceRoot":"","sources":["../../src/validators/validation-orchestrator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAqB,SAAS,EAAE,MAAM,YAAY,CAAC;AAiB3E,qBAAa,sBAAsB;IACjC,OAAO,CAAC,UAAU,CAAmB;;IAqBrC,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAS9B,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAiBrF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EnvironmentValidator } from './environment-validator.js';
|
|
2
|
+
import { GitValidator } from './git-validator.js';
|
|
3
|
+
import { StructureValidator } from './structure-validator.js';
|
|
4
|
+
import { RuntimeValidator } from './runtime-validator.js';
|
|
5
|
+
import { AgentValidator } from './agent-validator.js';
|
|
6
|
+
import { ExecutionValidator } from './execution-validator.js';
|
|
7
|
+
import { NotificationValidator } from './notification-validator.js';
|
|
8
|
+
import { RetryValidator } from './retry-validator.js';
|
|
9
|
+
import { DAGValidator } from './dag-validator.js';
|
|
10
|
+
export class ValidationOrchestrator {
|
|
11
|
+
validators = [];
|
|
12
|
+
constructor() {
|
|
13
|
+
this.register(new EnvironmentValidator());
|
|
14
|
+
this.register(new GitValidator());
|
|
15
|
+
this.register(new StructureValidator());
|
|
16
|
+
this.register(new RuntimeValidator());
|
|
17
|
+
this.register(new AgentValidator());
|
|
18
|
+
this.register(new ExecutionValidator());
|
|
19
|
+
this.register(new NotificationValidator());
|
|
20
|
+
this.register(new RetryValidator());
|
|
21
|
+
this.register(new DAGValidator());
|
|
22
|
+
}
|
|
23
|
+
register(validator) {
|
|
24
|
+
this.validators.push(validator);
|
|
25
|
+
this.validators.sort((a, b) => a.priority - b.priority);
|
|
26
|
+
}
|
|
27
|
+
async validate(config, repoPath) {
|
|
28
|
+
const context = {
|
|
29
|
+
config,
|
|
30
|
+
repoPath,
|
|
31
|
+
errors: [],
|
|
32
|
+
};
|
|
33
|
+
for (const validator of this.validators) {
|
|
34
|
+
if (context.skipRemainingValidators)
|
|
35
|
+
break;
|
|
36
|
+
if (validator.shouldRun(context)) {
|
|
37
|
+
await validator.validate(context);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return context.errors;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=validation-orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-orchestrator.js","sourceRoot":"","sources":["../../src/validators/validation-orchestrator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMlD,MAAM,OAAO,sBAAsB;IACzB,UAAU,GAAgB,EAAE,CAAC;IAErC;QAGE,IAAI,CAAC,QAAQ,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC,CAAC;QAClC,IAAI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|
-
"description": "Intelligent agent orchestration with
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Intelligent multi-runtime agent orchestration with DAG-planned parallelism, conditional logic, automated git hygiene, and multi-channel notifications. Supports Claude Code, Codex, and any OpenAI-compatible API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"agent-pipeline": "
|
|
9
|
+
"agent-pipeline": "dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "node node_modules/typescript/bin/tsc && node scripts/copy-templates.mjs",
|
|
15
|
+
"build": "node node_modules/typescript/bin/tsc && node scripts/generate-schema.mjs && node scripts/copy-templates.mjs",
|
|
16
16
|
"dev": "tsc --watch",
|
|
17
17
|
"test": "vitest",
|
|
18
18
|
"test:unit": "vitest --exclude '**/smoke/claude-cli-e2e.test.ts'",
|
|
19
19
|
"test:e2e": "RUN_E2E_TESTS=true vitest src/__tests__/smoke/claude-cli-e2e.test.ts",
|
|
20
20
|
"start": "node dist/index.js",
|
|
21
|
+
"generate:schema": "node scripts/generate-schema.mjs",
|
|
21
22
|
"postinstall": "test ! -d node_modules/typescript || npm run build",
|
|
22
23
|
"prepublishOnly": "npm run build"
|
|
23
24
|
},
|
|
@@ -27,11 +28,13 @@
|
|
|
27
28
|
"dist/**/*.d.ts.map",
|
|
28
29
|
"dist/**/*.js.map",
|
|
29
30
|
"dist/**/*.yml",
|
|
31
|
+
"dist/**/*.yaml",
|
|
32
|
+
"dist/**/*.json",
|
|
30
33
|
"dist/**/*.md",
|
|
31
34
|
"!dist/**/*.test.*",
|
|
32
35
|
"!dist/__tests__",
|
|
33
36
|
"README.md",
|
|
34
|
-
"
|
|
37
|
+
"LICENSE",
|
|
35
38
|
"CLAUDE.md"
|
|
36
39
|
],
|
|
37
40
|
"keywords": [
|
|
@@ -63,25 +66,28 @@
|
|
|
63
66
|
"url": "https://github.com/sponsors/FRE-Studios"
|
|
64
67
|
},
|
|
65
68
|
"dependencies": {
|
|
66
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
67
|
-
"
|
|
69
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.19",
|
|
70
|
+
"chalk": "^5.6.0",
|
|
68
71
|
"ink": "^4.4.1",
|
|
69
72
|
"ink-spinner": "^5.0.0",
|
|
73
|
+
"ink-text-input": "^5.0.1",
|
|
70
74
|
"node-notifier": "^10.0.1",
|
|
71
75
|
"react": "^18.2.0",
|
|
72
|
-
"simple-git": "^3.
|
|
76
|
+
"simple-git": "^3.30.0",
|
|
73
77
|
"tiktoken": "^1.0.22",
|
|
74
78
|
"uuid": "^10.0.0",
|
|
75
|
-
"yaml": "^2.
|
|
76
|
-
"zod": "^
|
|
79
|
+
"yaml": "^2.8.0",
|
|
80
|
+
"zod": "^4.0.0"
|
|
77
81
|
},
|
|
78
82
|
"devDependencies": {
|
|
79
83
|
"@types/node": "^20.14.0",
|
|
80
|
-
"@types/
|
|
84
|
+
"@types/node-notifier": "^8.0.5",
|
|
85
|
+
"@types/react": "^18.3.0",
|
|
81
86
|
"@types/uuid": "^10.0.0",
|
|
82
87
|
"@vitest/coverage-v8": "^3.0.0",
|
|
83
88
|
"ink-testing-library": "^4.0.0",
|
|
84
|
-
"
|
|
89
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
90
|
+
"typescript": "^5.8.0",
|
|
85
91
|
"vitest": "^3.0.0"
|
|
86
92
|
},
|
|
87
93
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAKA,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PipelineLoader } from '../../config/pipeline-loader.js';
|
|
2
|
-
import { HookInstaller } from '../hooks.js';
|
|
3
|
-
export async function installCommand(repoPath, pipelineName) {
|
|
4
|
-
const loader = new PipelineLoader(repoPath);
|
|
5
|
-
const { config } = await loader.loadPipeline(pipelineName);
|
|
6
|
-
if (config.trigger === 'manual') {
|
|
7
|
-
console.error('❌ Cannot install git hook for manual pipelines.');
|
|
8
|
-
console.error(` Pipeline "${pipelineName}" has trigger: manual`);
|
|
9
|
-
console.error(` Use 'agent-pipeline run ${pipelineName}' instead.`);
|
|
10
|
-
process.exit(1);
|
|
11
|
-
}
|
|
12
|
-
const installer = new HookInstaller(repoPath);
|
|
13
|
-
await installer.install(pipelineName, config.trigger);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=install.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAgB,EAChB,YAAoB;IAGpB,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAG3D,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,gBAAgB,YAAY,uBAAuB,CAAC,CAAC;QACnE,OAAO,CAAC,KAAK,CAAC,8BAA8B,YAAY,YAAY,CAAC,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC9C,MAAM,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAIA,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,QAAgB;IACrD,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC9C,MAAM,SAAS,CAAC,SAAS,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Post-Merge Cleanup Summary Reporter
|
|
2
|
-
|
|
3
|
-
You are a cleanup summary reporter agent in an automated post-merge pipeline.
|
|
4
|
-
|
|
5
|
-
## Your Task
|
|
6
|
-
|
|
7
|
-
Generate a comprehensive summary report of all cleanup activities performed after a merge. Review the outputs from previous pipeline stages and create a consolidated report.
|
|
8
|
-
|
|
9
|
-
## Context
|
|
10
|
-
|
|
11
|
-
You will receive context from previous stages:
|
|
12
|
-
- **doc-sync**: Documentation updates performed
|
|
13
|
-
- **dependency-audit**: Dependency and security findings
|
|
14
|
-
- **code-consolidation**: Code deduplication and consolidation results
|
|
15
|
-
|
|
16
|
-
## Report Structure
|
|
17
|
-
|
|
18
|
-
Create a markdown report in `CLEANUP_REPORT.md` with the following sections:
|
|
19
|
-
|
|
20
|
-
### 1. Overview
|
|
21
|
-
- Total cleanup tasks completed
|
|
22
|
-
- Overall health status
|
|
23
|
-
- Merge timestamp and branch information
|
|
24
|
-
|
|
25
|
-
### 2. Documentation Updates
|
|
26
|
-
- Files updated (from doc-sync stage)
|
|
27
|
-
- New sections added
|
|
28
|
-
- Links to updated documentation
|
|
29
|
-
|
|
30
|
-
### 3. Dependency Health
|
|
31
|
-
- Outdated packages count (from dependency-audit stage)
|
|
32
|
-
- Security issues found and addressed
|
|
33
|
-
- Recommended actions
|
|
34
|
-
|
|
35
|
-
### 4. Code Consolidation
|
|
36
|
-
- Duplicate code instances removed (from code-consolidation stage)
|
|
37
|
-
- Files merged or refactored
|
|
38
|
-
- Lines of code reduced
|
|
39
|
-
|
|
40
|
-
### 5. Next Steps
|
|
41
|
-
- Action items for developers
|
|
42
|
-
- Follow-up tasks required
|
|
43
|
-
- Recommended improvements
|
|
44
|
-
|
|
45
|
-
## Output Format
|
|
46
|
-
|
|
47
|
-
After creating the report, call the `report_outputs` tool with:
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
report_outputs({
|
|
51
|
-
outputs: {
|
|
52
|
-
summary: "Generated post-merge cleanup report. Completed 3 cleanup tasks: updated 5 documentation files, found 3 outdated dependencies (no critical security issues), removed 12 duplicate code blocks reducing codebase by 234 lines. 4 action items for follow-up.",
|
|
53
|
-
report_created: true,
|
|
54
|
-
total_issues: 3,
|
|
55
|
-
action_items: 4,
|
|
56
|
-
cleanup_tasks_completed: 3
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**IMPORTANT:** The summary should be up to a few sentences or around 500 words or less, covering:
|
|
62
|
-
- What cleanup tasks were completed (doc updates, dependency audits, code consolidation)
|
|
63
|
-
- Key findings from each cleanup area
|
|
64
|
-
- Total issues found and action items generated
|
|
65
|
-
- Overall health status
|
|
66
|
-
|
|
67
|
-
## Guidelines
|
|
68
|
-
|
|
69
|
-
- Be concise but informative
|
|
70
|
-
- Highlight critical issues requiring immediate attention
|
|
71
|
-
- Use emojis for visual clarity (✅ ⚠️ ❌ 📝 🔒 🧹)
|
|
72
|
-
- Include actionable recommendations
|
|
73
|
-
- Link to relevant files and documentation
|
|
74
|
-
|
|
75
|
-
## Example Output
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
# Post-Merge Cleanup Report
|
|
79
|
-
Generated: 2024-01-15 14:30:00
|
|
80
|
-
|
|
81
|
-
## Overview
|
|
82
|
-
✅ Successfully completed 3 cleanup tasks
|
|
83
|
-
🎯 Overall Health: Good
|
|
84
|
-
|
|
85
|
-
## Documentation Updates
|
|
86
|
-
📝 Updated 5 files:
|
|
87
|
-
- README.md (added API section)
|
|
88
|
-
- CONTRIBUTING.md (updated workflow)
|
|
89
|
-
- docs/architecture.md (new diagrams)
|
|
90
|
-
|
|
91
|
-
## Dependency Health
|
|
92
|
-
⚠️ Found 3 outdated packages:
|
|
93
|
-
- express: 4.17.1 → 4.18.2
|
|
94
|
-
- typescript: 4.9.0 → 5.0.0
|
|
95
|
-
|
|
96
|
-
🔒 No security vulnerabilities
|
|
97
|
-
|
|
98
|
-
## Code Consolidation
|
|
99
|
-
🧹 Removed 12 duplicate code blocks
|
|
100
|
-
📦 Merged 4 utility files into single module
|
|
101
|
-
💡 Reduced codebase by 234 lines
|
|
102
|
-
|
|
103
|
-
## Next Steps
|
|
104
|
-
1. Review and update outdated dependencies
|
|
105
|
-
2. Verify all documentation links
|
|
106
|
-
3. Consider extracting common patterns in utils/
|
|
107
|
-
```
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Code Reducer Agent
|
|
2
|
-
|
|
3
|
-
You are a code reduction agent focused on minimizing code footprint while maintaining clarity.
|
|
4
|
-
|
|
5
|
-
## Your Task
|
|
6
|
-
|
|
7
|
-
Reduce code by:
|
|
8
|
-
1. **Deletion**: Remove dead code, unused imports, redundant comments
|
|
9
|
-
2. **Simplification**: Simplify conditionals, collapse nested structures
|
|
10
|
-
3. **Consolidation**: Extract duplicate patterns into shared utilities
|
|
11
|
-
|
|
12
|
-
## Core Principle
|
|
13
|
-
|
|
14
|
-
**The best code is the least code** - but semantic clarity is non-negotiable.
|
|
15
|
-
|
|
16
|
-
## What to Do
|
|
17
|
-
|
|
18
|
-
- Remove unreachable code and unused variables
|
|
19
|
-
- Simplify complex conditionals with early returns
|
|
20
|
-
- Use language idioms over custom implementations
|
|
21
|
-
- Extract repeated patterns (3+ occurrences)
|
|
22
|
-
- Eliminate redundant null checks
|
|
23
|
-
|
|
24
|
-
## What to Avoid
|
|
25
|
-
|
|
26
|
-
- Reducing meaningful names (`createPullRequest` → `cPR` ❌)
|
|
27
|
-
- Over-compressing into unreadable one-liners
|
|
28
|
-
- Creating abstractions for only 2 use cases
|
|
29
|
-
- Compromising type safety to save lines
|
|
30
|
-
|
|
31
|
-
## Output Format
|
|
32
|
-
|
|
33
|
-
Use the report_outputs tool:
|
|
34
|
-
|
|
35
|
-
```javascript
|
|
36
|
-
report_outputs({
|
|
37
|
-
outputs: {
|
|
38
|
-
summary: "Reduced codebase across 15 files. Eliminated 234 lines through 12 refactorings: removed 8 duplicate blocks, simplified 18 conditionals, consolidated 4 utility functions. Cyclomatic complexity reduced by 23%. All tests passing.",
|
|
39
|
-
lines_removed: 234,
|
|
40
|
-
files_modified: 15,
|
|
41
|
-
duplicates_eliminated: 8,
|
|
42
|
-
functions_consolidated: 4,
|
|
43
|
-
complexity_reduction: 23
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**IMPORTANT:** The summary should be up to a few sentences or around 500 words or less, covering:
|
|
49
|
-
- What you reduced (file count, total lines removed)
|
|
50
|
-
- Reduction techniques applied (deduplication, simplification, consolidation)
|
|
51
|
-
- Complexity improvements and test status
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Code Review Agent
|
|
2
|
-
|
|
3
|
-
You are a code review agent in an automated pipeline.
|
|
4
|
-
|
|
5
|
-
## Your Task
|
|
6
|
-
|
|
7
|
-
1. Review the git diff provided in the pipeline context
|
|
8
|
-
2. Check for:
|
|
9
|
-
- Code style issues
|
|
10
|
-
- Potential logic errors
|
|
11
|
-
- Best practice violations
|
|
12
|
-
- Code complexity concerns
|
|
13
|
-
|
|
14
|
-
## Output Format
|
|
15
|
-
|
|
16
|
-
Use the report_outputs tool with this structure:
|
|
17
|
-
|
|
18
|
-
```javascript
|
|
19
|
-
report_outputs({
|
|
20
|
-
outputs: {
|
|
21
|
-
summary: "Reviewed 12 files. Found 5 issues (2 critical, 3 warnings). Main concerns: security in auth.ts, performance in query.ts.",
|
|
22
|
-
issues_found: 5,
|
|
23
|
-
severity_level: "high",
|
|
24
|
-
files_reviewed: 12
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**IMPORTANT:** The summary should be up to a few sentences or around 500 words or less, covering:
|
|
30
|
-
- What you did (files reviewed, code analyzed)
|
|
31
|
-
- Key findings (issue count, severity breakdown)
|
|
32
|
-
- Main concerns or critical issues requiring attention
|
|
33
|
-
|
|
34
|
-
Then provide a detailed summary of your review findings.
|