@backendkit-labs/agent-coding 0.28.5 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/context-hooks.test.d.ts +2 -0
- package/dist/__tests__/context-hooks.test.d.ts.map +1 -0
- package/dist/__tests__/context-hooks.test.js +21 -0
- package/dist/__tests__/context-hooks.test.js.map +1 -0
- package/dist/__tests__/sandbox.test.js +1 -1
- package/dist/__tests__/sandbox.test.js.map +1 -1
- package/dist/context-hooks.d.ts +11 -0
- package/dist/context-hooks.d.ts.map +1 -0
- package/dist/context-hooks.js +23 -0
- package/dist/context-hooks.js.map +1 -0
- package/dist/context-services.d.ts +12 -0
- package/dist/context-services.d.ts.map +1 -0
- package/dist/context-services.js +20 -0
- package/dist/context-services.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/orchestration/capability-matrix.d.ts +1 -1
- package/dist/orchestration/capability-matrix.d.ts.map +1 -1
- package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts +2 -0
- package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js +42 -0
- package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js.map +1 -0
- package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts +2 -0
- package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js +64 -0
- package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js.map +1 -0
- package/dist/pipeline/__tests__/engine-brief.test.d.ts +2 -0
- package/dist/pipeline/__tests__/engine-brief.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/engine-brief.test.js +159 -0
- package/dist/pipeline/__tests__/engine-brief.test.js.map +1 -0
- package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts +2 -0
- package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts.map +1 -0
- package/dist/pipeline/__tests__/qa-orchestrator.test.js +276 -0
- package/dist/pipeline/__tests__/qa-orchestrator.test.js.map +1 -0
- package/dist/pipeline/coding-pipeline-hooks.d.ts +28 -0
- package/dist/pipeline/coding-pipeline-hooks.d.ts.map +1 -0
- package/dist/pipeline/coding-pipeline-hooks.js +91 -0
- package/dist/pipeline/coding-pipeline-hooks.js.map +1 -0
- package/dist/pipeline/index.d.ts +13 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +44 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts +11 -0
- package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js +105 -0
- package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts +2 -0
- package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js +21 -0
- package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts +9 -0
- package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js +101 -0
- package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts +2 -0
- package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js +54 -0
- package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts +2 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js +57 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts +9 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js +43 -0
- package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js.map +1 -0
- package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts +10 -0
- package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts.map +1 -0
- package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js +264 -0
- package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts +31 -0
- package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-ci-blocker.js +120 -0
- package/dist/pipeline/orchestration/audit/audit-ci-blocker.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts +33 -0
- package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-finding-tracer.js +126 -0
- package/dist/pipeline/orchestration/audit/audit-finding-tracer.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts +27 -0
- package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-lessons-learned.js +155 -0
- package/dist/pipeline/orchestration/audit/audit-lessons-learned.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts +21 -0
- package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-pending-issues.js +110 -0
- package/dist/pipeline/orchestration/audit/audit-pending-issues.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts +39 -0
- package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js +65 -0
- package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts +30 -0
- package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-report-renderer.js +249 -0
- package/dist/pipeline/orchestration/audit/audit-report-renderer.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts +52 -0
- package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-report-version-manager.js +144 -0
- package/dist/pipeline/orchestration/audit/audit-report-version-manager.js.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts +37 -0
- package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js +129 -0
- package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js.map +1 -0
- package/dist/pipeline/orchestration/audit/index.d.ts +17 -0
- package/dist/pipeline/orchestration/audit/index.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/index.js +26 -0
- package/dist/pipeline/orchestration/audit/index.js.map +1 -0
- package/dist/pipeline/orchestration/audit/types.d.ts +79 -0
- package/dist/pipeline/orchestration/audit/types.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit/types.js +10 -0
- package/dist/pipeline/orchestration/audit/types.js.map +1 -0
- package/dist/pipeline/orchestration/audit-reporter.d.ts +133 -0
- package/dist/pipeline/orchestration/audit-reporter.d.ts.map +1 -0
- package/dist/pipeline/orchestration/audit-reporter.js +322 -0
- package/dist/pipeline/orchestration/audit-reporter.js.map +1 -0
- package/dist/pipeline/orchestration/config-loader.d.ts +51 -0
- package/dist/pipeline/orchestration/config-loader.d.ts.map +1 -0
- package/dist/pipeline/orchestration/config-loader.js +215 -0
- package/dist/pipeline/orchestration/config-loader.js.map +1 -0
- package/dist/pipeline/orchestration/domain-detector.d.ts +36 -0
- package/dist/pipeline/orchestration/domain-detector.d.ts.map +1 -0
- package/dist/pipeline/orchestration/domain-detector.js +157 -0
- package/dist/pipeline/orchestration/domain-detector.js.map +1 -0
- package/dist/pipeline/orchestration/fsm.d.ts +92 -0
- package/dist/pipeline/orchestration/fsm.d.ts.map +1 -0
- package/dist/pipeline/orchestration/fsm.js +243 -0
- package/dist/pipeline/orchestration/fsm.js.map +1 -0
- package/dist/pipeline/orchestration/gate-resolver.d.ts +52 -0
- package/dist/pipeline/orchestration/gate-resolver.d.ts.map +1 -0
- package/dist/pipeline/orchestration/gate-resolver.js +120 -0
- package/dist/pipeline/orchestration/gate-resolver.js.map +1 -0
- package/dist/pipeline/orchestration/index.d.ts +16 -0
- package/dist/pipeline/orchestration/index.d.ts.map +1 -0
- package/dist/pipeline/orchestration/index.js +32 -0
- package/dist/pipeline/orchestration/index.js.map +1 -0
- package/dist/pipeline/orchestration/intent-detector.d.ts +37 -0
- package/dist/pipeline/orchestration/intent-detector.d.ts.map +1 -0
- package/dist/pipeline/orchestration/intent-detector.js +248 -0
- package/dist/pipeline/orchestration/intent-detector.js.map +1 -0
- package/dist/pipeline/orchestration/keyword-match.d.ts +17 -0
- package/dist/pipeline/orchestration/keyword-match.d.ts.map +1 -0
- package/dist/pipeline/orchestration/keyword-match.js +26 -0
- package/dist/pipeline/orchestration/keyword-match.js.map +1 -0
- package/dist/pipeline/orchestration/orchestrator.d.ts +158 -0
- package/dist/pipeline/orchestration/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestration/orchestrator.js +414 -0
- package/dist/pipeline/orchestration/orchestrator.js.map +1 -0
- package/dist/pipeline/orchestration/policy-engine.d.ts +54 -0
- package/dist/pipeline/orchestration/policy-engine.d.ts.map +1 -0
- package/dist/pipeline/orchestration/policy-engine.js +278 -0
- package/dist/pipeline/orchestration/policy-engine.js.map +1 -0
- package/dist/pipeline/orchestration/risk-scorer.d.ts +38 -0
- package/dist/pipeline/orchestration/risk-scorer.d.ts.map +1 -0
- package/dist/pipeline/orchestration/risk-scorer.js +145 -0
- package/dist/pipeline/orchestration/risk-scorer.js.map +1 -0
- package/dist/pipeline/orchestration/task-context.d.ts +205 -0
- package/dist/pipeline/orchestration/task-context.d.ts.map +1 -0
- package/dist/pipeline/orchestration/task-context.js +162 -0
- package/dist/pipeline/orchestration/task-context.js.map +1 -0
- package/dist/pipeline/orchestration/types.d.ts +111 -0
- package/dist/pipeline/orchestration/types.d.ts.map +1 -0
- package/dist/pipeline/orchestration/types.js +37 -0
- package/dist/pipeline/orchestration/types.js.map +1 -0
- package/dist/pipeline/qa/__tests__/QAService.test.d.ts +2 -0
- package/dist/pipeline/qa/__tests__/QAService.test.d.ts.map +1 -0
- package/dist/pipeline/qa/__tests__/QAService.test.js +170 -0
- package/dist/pipeline/qa/__tests__/QAService.test.js.map +1 -0
- package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts +2 -0
- package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts.map +1 -0
- package/dist/pipeline/qa/__tests__/QAService.verdict.test.js +39 -0
- package/dist/pipeline/qa/__tests__/QAService.verdict.test.js.map +1 -0
- package/dist/pipeline/qa/index.d.ts +3 -0
- package/dist/pipeline/qa/index.d.ts.map +1 -0
- package/dist/pipeline/qa/index.js +6 -0
- package/dist/pipeline/qa/index.js.map +1 -0
- package/dist/pipeline/qa/qa-service.d.ts +33 -0
- package/dist/pipeline/qa/qa-service.d.ts.map +1 -0
- package/dist/pipeline/qa/qa-service.js +239 -0
- package/dist/pipeline/qa/qa-service.js.map +1 -0
- package/dist/pipeline/qa-orchestrator.d.ts +60 -0
- package/dist/pipeline/qa-orchestrator.d.ts.map +1 -0
- package/dist/pipeline/qa-orchestrator.js +177 -0
- package/dist/pipeline/qa-orchestrator.js.map +1 -0
- package/dist/pipeline/reflection/domains/agent-domain.d.ts +40 -0
- package/dist/pipeline/reflection/domains/agent-domain.d.ts.map +1 -0
- package/dist/pipeline/reflection/domains/agent-domain.js +161 -0
- package/dist/pipeline/reflection/domains/agent-domain.js.map +1 -0
- package/dist/pipeline/reflection/domains/audit-domain.d.ts +46 -0
- package/dist/pipeline/reflection/domains/audit-domain.d.ts.map +1 -0
- package/dist/pipeline/reflection/domains/audit-domain.js +241 -0
- package/dist/pipeline/reflection/domains/audit-domain.js.map +1 -0
- package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts +40 -0
- package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts.map +1 -0
- package/dist/pipeline/reflection/domains/bootstrap-domain.js +156 -0
- package/dist/pipeline/reflection/domains/bootstrap-domain.js.map +1 -0
- package/dist/pipeline/reflection/domains/commit-domain.d.ts +40 -0
- package/dist/pipeline/reflection/domains/commit-domain.d.ts.map +1 -0
- package/dist/pipeline/reflection/domains/commit-domain.js +174 -0
- package/dist/pipeline/reflection/domains/commit-domain.js.map +1 -0
- package/dist/pipeline/reflection/domains/test-domain.d.ts +40 -0
- package/dist/pipeline/reflection/domains/test-domain.d.ts.map +1 -0
- package/dist/pipeline/reflection/domains/test-domain.js +194 -0
- package/dist/pipeline/reflection/domains/test-domain.js.map +1 -0
- package/dist/pipeline/reflection/historical-loader.d.ts +105 -0
- package/dist/pipeline/reflection/historical-loader.d.ts.map +1 -0
- package/dist/pipeline/reflection/historical-loader.js +462 -0
- package/dist/pipeline/reflection/historical-loader.js.map +1 -0
- package/dist/pipeline/reflection/hooks/agent-hook.d.ts +72 -0
- package/dist/pipeline/reflection/hooks/agent-hook.d.ts.map +1 -0
- package/dist/pipeline/reflection/hooks/agent-hook.js +98 -0
- package/dist/pipeline/reflection/hooks/agent-hook.js.map +1 -0
- package/dist/pipeline/reflection/hooks/audit-hook.d.ts +72 -0
- package/dist/pipeline/reflection/hooks/audit-hook.d.ts.map +1 -0
- package/dist/pipeline/reflection/hooks/audit-hook.js +112 -0
- package/dist/pipeline/reflection/hooks/audit-hook.js.map +1 -0
- package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts +71 -0
- package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts.map +1 -0
- package/dist/pipeline/reflection/hooks/bootstrap-hook.js +97 -0
- package/dist/pipeline/reflection/hooks/bootstrap-hook.js.map +1 -0
- package/dist/pipeline/reflection/hooks/commit-hook.d.ts +63 -0
- package/dist/pipeline/reflection/hooks/commit-hook.d.ts.map +1 -0
- package/dist/pipeline/reflection/hooks/commit-hook.js +90 -0
- package/dist/pipeline/reflection/hooks/commit-hook.js.map +1 -0
- package/dist/pipeline/reflection/hooks/test-hook.d.ts +65 -0
- package/dist/pipeline/reflection/hooks/test-hook.d.ts.map +1 -0
- package/dist/pipeline/reflection/hooks/test-hook.js +99 -0
- package/dist/pipeline/reflection/hooks/test-hook.js.map +1 -0
- package/dist/pipeline/reflection/lessons-memo-generator.d.ts +60 -0
- package/dist/pipeline/reflection/lessons-memo-generator.d.ts.map +1 -0
- package/dist/pipeline/reflection/lessons-memo-generator.js +286 -0
- package/dist/pipeline/reflection/lessons-memo-generator.js.map +1 -0
- package/dist/store/ProjectStore.d.ts +1 -1
- package/dist/store/ProjectStore.d.ts.map +1 -1
- package/dist/store/types.d.ts +28 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +3 -0
- package/dist/store/types.js.map +1 -0
- package/dist/tools/__tests__/command-parser.test.js +1 -1
- package/dist/tools/__tests__/command-parser.test.js.map +1 -1
- package/dist/tools/__tests__/declared-facts.test.d.ts +2 -0
- package/dist/tools/__tests__/declared-facts.test.d.ts.map +1 -0
- package/dist/tools/__tests__/declared-facts.test.js +21 -0
- package/dist/tools/__tests__/declared-facts.test.js.map +1 -0
- package/dist/tools/__tests__/package-install.test.d.ts +2 -0
- package/dist/tools/__tests__/package-install.test.d.ts.map +1 -0
- package/dist/tools/__tests__/package-install.test.js +56 -0
- package/dist/tools/__tests__/package-install.test.js.map +1 -0
- package/dist/tools/__tests__/save-tools.secrets.test.js +1 -1
- package/dist/tools/__tests__/save-tools.secrets.test.js.map +1 -1
- package/dist/tools/edit-file.d.ts.map +1 -1
- package/dist/tools/edit-file.js +1 -0
- package/dist/tools/edit-file.js.map +1 -1
- package/dist/tools/list-directory.d.ts.map +1 -1
- package/dist/tools/list-directory.js +1 -0
- package/dist/tools/list-directory.js.map +1 -1
- package/dist/tools/package-install.d.ts +11 -0
- package/dist/tools/package-install.d.ts.map +1 -0
- package/dist/tools/package-install.js +112 -0
- package/dist/tools/package-install.js.map +1 -0
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +1 -0
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/run-command.d.ts.map +1 -1
- package/dist/tools/run-command.js +5 -1
- package/dist/tools/run-command.js.map +1 -1
- package/dist/tools/save-audit.d.ts.map +1 -1
- package/dist/tools/save-audit.js +7 -6
- package/dist/tools/save-audit.js.map +1 -1
- package/dist/tools/save-context.d.ts.map +1 -1
- package/dist/tools/save-context.js +3 -2
- package/dist/tools/save-context.js.map +1 -1
- package/dist/tools/save-learning.d.ts.map +1 -1
- package/dist/tools/save-learning.js +4 -3
- package/dist/tools/save-learning.js.map +1 -1
- package/dist/tools/save-user-preference.d.ts.map +1 -1
- package/dist/tools/save-user-preference.js +3 -2
- package/dist/tools/save-user-preference.js.map +1 -1
- package/dist/tools/search-files.d.ts.map +1 -1
- package/dist/tools/search-files.js +1 -0
- package/dist/tools/search-files.js.map +1 -1
- package/dist/tools/update-session.d.ts.map +1 -1
- package/dist/tools/update-session.js +3 -2
- package/dist/tools/update-session.js.map +1 -1
- package/dist/tools/write-file.d.ts.map +1 -1
- package/dist/tools/write-file.js +1 -0
- package/dist/tools/write-file.js.map +1 -1
- package/package.json +63 -44
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// The coding pipeline: task classification (intent, domains, risk, policies, FSM), QA gates and the engine
|
|
3
|
+
// hooks that apply them (SPEC-0015). Import from '@backendkit-labs/agent-coding/pipeline'.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.LessonsMemoGenerator = exports.HistoricalLoader = exports.BootstrapHook = exports.CommitHook = exports.TestHook = exports.AgentHook = exports.AuditHook = exports.QAService = exports.buildOrchestrationBrief = exports.codingPipelineHooks = void 0;
|
|
20
|
+
// Engine hooks
|
|
21
|
+
var coding_pipeline_hooks_1 = require("./coding-pipeline-hooks");
|
|
22
|
+
Object.defineProperty(exports, "codingPipelineHooks", { enumerable: true, get: function () { return coding_pipeline_hooks_1.codingPipelineHooks; } });
|
|
23
|
+
Object.defineProperty(exports, "buildOrchestrationBrief", { enumerable: true, get: function () { return coding_pipeline_hooks_1.buildOrchestrationBrief; } });
|
|
24
|
+
// Orchestrator, FSM, audit
|
|
25
|
+
__exportStar(require("./orchestration"), exports);
|
|
26
|
+
// QA
|
|
27
|
+
var qa_service_1 = require("./qa/qa-service");
|
|
28
|
+
Object.defineProperty(exports, "QAService", { enumerable: true, get: function () { return qa_service_1.QAService; } });
|
|
29
|
+
// Learning hooks tied to the pipeline's audit trail
|
|
30
|
+
var audit_hook_1 = require("./reflection/hooks/audit-hook");
|
|
31
|
+
Object.defineProperty(exports, "AuditHook", { enumerable: true, get: function () { return audit_hook_1.AuditHook; } });
|
|
32
|
+
var agent_hook_1 = require("./reflection/hooks/agent-hook");
|
|
33
|
+
Object.defineProperty(exports, "AgentHook", { enumerable: true, get: function () { return agent_hook_1.AgentHook; } });
|
|
34
|
+
var test_hook_1 = require("./reflection/hooks/test-hook");
|
|
35
|
+
Object.defineProperty(exports, "TestHook", { enumerable: true, get: function () { return test_hook_1.TestHook; } });
|
|
36
|
+
var commit_hook_1 = require("./reflection/hooks/commit-hook");
|
|
37
|
+
Object.defineProperty(exports, "CommitHook", { enumerable: true, get: function () { return commit_hook_1.CommitHook; } });
|
|
38
|
+
var bootstrap_hook_1 = require("./reflection/hooks/bootstrap-hook");
|
|
39
|
+
Object.defineProperty(exports, "BootstrapHook", { enumerable: true, get: function () { return bootstrap_hook_1.BootstrapHook; } });
|
|
40
|
+
var historical_loader_1 = require("./reflection/historical-loader");
|
|
41
|
+
Object.defineProperty(exports, "HistoricalLoader", { enumerable: true, get: function () { return historical_loader_1.HistoricalLoader; } });
|
|
42
|
+
var lessons_memo_generator_1 = require("./reflection/lessons-memo-generator");
|
|
43
|
+
Object.defineProperty(exports, "LessonsMemoGenerator", { enumerable: true, get: function () { return lessons_memo_generator_1.LessonsMemoGenerator; } });
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":";AAAA,2GAA2G;AAC3G,2FAA2F;;;;;;;;;;;;;;;;;AAE3F,eAAe;AACf,iEAAuF;AAA9E,4HAAA,mBAAmB,OAAA;AAAE,gIAAA,uBAAuB,OAAA;AAGrD,2BAA2B;AAC3B,kDAAgC;AAEhC,KAAK;AACL,8CAA4C;AAAnC,uGAAA,SAAS,OAAA;AAGlB,oDAAoD;AACpD,4DAA0D;AAAjD,uGAAA,SAAS,OAAA;AAClB,4DAA0D;AAAjD,uGAAA,SAAS,OAAA;AAClB,0DAAwD;AAA/C,qGAAA,QAAQ,OAAA;AACjB,8DAA4D;AAAnD,yGAAA,UAAU,OAAA;AACnB,oEAAkE;AAAzD,+GAAA,aAAa,OAAA;AACtB,oEAAkE;AAAzD,qHAAA,gBAAgB,OAAA;AACzB,8EAA2E;AAAlE,8HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test: agent IDs emitted by policy-engine and gate-resolver must
|
|
3
|
+
* match the canonical IDs registered in profiles (no "-agent" suffix).
|
|
4
|
+
*
|
|
5
|
+
* Background: policy-engine and gate-resolver previously used 'architecture-agent'
|
|
6
|
+
* and 'security-agent' while profiles register 'architecture' and 'security'.
|
|
7
|
+
* That mismatch caused duplicate entries in selectAgents() and potential
|
|
8
|
+
* "Agent not found" errors on LLM delegation (AgentEngine.ts:657).
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=agent-id-consistency.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-id-consistency.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/agent-id-consistency.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Regression test: agent IDs emitted by policy-engine and gate-resolver must
|
|
4
|
+
* match the canonical IDs registered in profiles (no "-agent" suffix).
|
|
5
|
+
*
|
|
6
|
+
* Background: policy-engine and gate-resolver previously used 'architecture-agent'
|
|
7
|
+
* and 'security-agent' while profiles register 'architecture' and 'security'.
|
|
8
|
+
* That mismatch caused duplicate entries in selectAgents() and potential
|
|
9
|
+
* "Agent not found" errors on LLM delegation (AgentEngine.ts:657).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const policy_engine_1 = require("../policy-engine");
|
|
13
|
+
const gate_resolver_1 = require("../gate-resolver");
|
|
14
|
+
const task_context_1 = require("../task-context");
|
|
15
|
+
const types_1 = require("../types");
|
|
16
|
+
// ── Canonical IDs registered by coding profiles ──────────────────────────────
|
|
17
|
+
const CANONICAL_IDS = new Set([
|
|
18
|
+
'general', 'coder', 'backend', 'frontend',
|
|
19
|
+
'qa-engineer', 'security', 'architecture',
|
|
20
|
+
'infrastructure', 'data', 'project-manager',
|
|
21
|
+
]);
|
|
22
|
+
function hasAgentSuffix(id) {
|
|
23
|
+
return id.endsWith('-agent');
|
|
24
|
+
}
|
|
25
|
+
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
26
|
+
function taskWith(overrides) {
|
|
27
|
+
return { ...(0, task_context_1.createTaskContext)('test'), status: 'classified', ...overrides };
|
|
28
|
+
}
|
|
29
|
+
function emptyPolicy() {
|
|
30
|
+
return { mustInclude: [], requiredGates: [], mustExecute: [], customGates: [], appliedRules: [] };
|
|
31
|
+
}
|
|
32
|
+
// ── Tests ─────────────────────────────────────────────────────────────────────
|
|
33
|
+
describe('agent ID consistency — no -agent suffix', () => {
|
|
34
|
+
describe('evaluatePolicies DEFAULT_RULES', () => {
|
|
35
|
+
const cases = [
|
|
36
|
+
{ label: 'actionType=design', task: { actionType: 'design' } },
|
|
37
|
+
{ label: 'actionType=security_audit', task: { actionType: 'security_audit' } },
|
|
38
|
+
{ label: 'riskLevel=high', task: { riskLevel: 'high' } },
|
|
39
|
+
{ label: 'riskLevel=critical', task: { riskLevel: 'critical' } },
|
|
40
|
+
{ label: 'domain=security', task: { domains: ['security'] } },
|
|
41
|
+
{
|
|
42
|
+
label: 'breaking_change=true',
|
|
43
|
+
task: { riskFactors: { breaking_change: true, security_sensitive: false, cross_service_impact: false, db_transactional: false, production_critical: false, complexity: 5 } },
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: 'security_sensitive=true',
|
|
47
|
+
task: { riskFactors: { breaking_change: false, security_sensitive: true, cross_service_impact: false, db_transactional: false, production_critical: false, complexity: 5 } },
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'cross_service_impact=true',
|
|
51
|
+
task: { riskFactors: { breaking_change: false, security_sensitive: false, cross_service_impact: true, db_transactional: false, production_critical: false, complexity: 5 } },
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
test.each(cases)('$label: mustInclude uses canonical IDs', ({ task }) => {
|
|
55
|
+
const result = (0, policy_engine_1.evaluatePolicies)(taskWith(task));
|
|
56
|
+
for (const id of result.mustInclude) {
|
|
57
|
+
expect(hasAgentSuffix(id)).toBe(false);
|
|
58
|
+
expect(CANONICAL_IDS.has(id)).toBe(true);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe('resolveGates pipeline agentIds', () => {
|
|
63
|
+
it('security review phase uses canonical id', () => {
|
|
64
|
+
const task = taskWith({ requiresSecurityReview: true });
|
|
65
|
+
const { pipeline } = (0, gate_resolver_1.resolveGates)(task, emptyPolicy(), (0, types_1.defaultOrchestratorConfig)(), [
|
|
66
|
+
{ agentId: 'backend', score: 80, reason: 'domain' },
|
|
67
|
+
]);
|
|
68
|
+
const ids = pipeline.map(p => p.agentId);
|
|
69
|
+
expect(ids).not.toContain('security-agent');
|
|
70
|
+
expect(ids).toContain('security');
|
|
71
|
+
});
|
|
72
|
+
it('architecture review phase uses canonical id', () => {
|
|
73
|
+
const task = taskWith({ requiresArchitectureReview: true });
|
|
74
|
+
const { pipeline } = (0, gate_resolver_1.resolveGates)(task, emptyPolicy(), (0, types_1.defaultOrchestratorConfig)(), [
|
|
75
|
+
{ agentId: 'backend', score: 80, reason: 'domain' },
|
|
76
|
+
]);
|
|
77
|
+
const ids = pipeline.map(p => p.agentId);
|
|
78
|
+
expect(ids).not.toContain('architecture-agent');
|
|
79
|
+
expect(ids).toContain('architecture');
|
|
80
|
+
});
|
|
81
|
+
it('qa verify phase uses canonical id', () => {
|
|
82
|
+
const task = taskWith({ requiresQaApproval: true });
|
|
83
|
+
const { pipeline } = (0, gate_resolver_1.resolveGates)(task, emptyPolicy(), (0, types_1.defaultOrchestratorConfig)(), [
|
|
84
|
+
{ agentId: 'backend', score: 80, reason: 'domain' },
|
|
85
|
+
]);
|
|
86
|
+
const ids = pipeline.map(p => p.agentId);
|
|
87
|
+
expect(ids).not.toContain('qa-agent');
|
|
88
|
+
expect(ids).toContain('qa-engineer');
|
|
89
|
+
});
|
|
90
|
+
it('no pipeline entry uses a -agent suffix', () => {
|
|
91
|
+
const task = taskWith({
|
|
92
|
+
requiresSecurityReview: true,
|
|
93
|
+
requiresArchitectureReview: true,
|
|
94
|
+
requiresQaApproval: true,
|
|
95
|
+
});
|
|
96
|
+
const { pipeline } = (0, gate_resolver_1.resolveGates)(task, emptyPolicy(), (0, types_1.defaultOrchestratorConfig)(), [
|
|
97
|
+
{ agentId: 'backend', score: 80, reason: 'domain' },
|
|
98
|
+
]);
|
|
99
|
+
for (const phase of pipeline) {
|
|
100
|
+
expect(hasAgentSuffix(phase.agentId)).toBe(false);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=agent-id-consistency.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-id-consistency.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/agent-id-consistency.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAEH,oDAAoD;AACpD,oDAAgD;AAChD,kDAAsE;AACtE,oCAAq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C,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-commit-skipped.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-commit-skipped.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fsm_1 = require("../fsm");
|
|
4
|
+
const task_context_1 = require("../task-context");
|
|
5
|
+
describe('TaskFSM — commit_skipped → commit_allowed', () => {
|
|
6
|
+
it('is reachable: the transition is listed and no guard blocks it', () => {
|
|
7
|
+
const fsm = new fsm_1.TaskFSM();
|
|
8
|
+
let task = (0, task_context_1.createTaskContext)('commit sin cambios');
|
|
9
|
+
task = (0, task_context_1.transitionTask)(task, 'commit_planning');
|
|
10
|
+
task = (0, task_context_1.transitionTask)(task, 'commit_skipped');
|
|
11
|
+
const result = fsm.transition(task, 'commit_allowed');
|
|
12
|
+
expect(result.allowed).toBe(true);
|
|
13
|
+
expect(result.task?.status).toBe('commit_allowed');
|
|
14
|
+
});
|
|
15
|
+
it('still refuses commit_allowed from states that never earned it', () => {
|
|
16
|
+
const fsm = new fsm_1.TaskFSM();
|
|
17
|
+
const task = (0, task_context_1.transitionTask)((0, task_context_1.createTaskContext)('x'), 'classified');
|
|
18
|
+
expect(fsm.transition(task, 'commit_allowed').allowed).toBe(false);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=fsm-commit-skipped.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-commit-skipped.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-commit-skipped.test.ts"],"names":[],"mappings":";;AAAA,gCAAiC;AACjC,kDAAoE;AAEpE,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACvD,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACrE,MAAM,GAAG,GAAG,IAAI,aAAO,EAAE,CAAC;QAC1B,IAAI,IAAI,GAAG,IAAA,gCAAiB,EAAC,oBAAoB,CAAC,CAAC;QACnD,IAAI,GAAG,IAAA,6BAAc,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC/C,IAAI,GAAG,IAAA,6BAAc,EAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACrE,MAAM,GAAG,GAAG,IAAI,aAAO,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,IAAA,6BAAc,EAAC,IAAA,gCAAiB,EAAC,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;QAClE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for getCriticalPath / hasPassedGate (H-002).
|
|
3
|
+
*
|
|
4
|
+
* The previous implementation used linear index comparison which gave false
|
|
5
|
+
* positives: a task at 'implementation' that went classified→implementation
|
|
6
|
+
* (skipping design_review) was incorrectly reported as having passed design_review.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=fsm-critical-path.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-critical-path.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-critical-path.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tests for getCriticalPath / hasPassedGate (H-002).
|
|
4
|
+
*
|
|
5
|
+
* The previous implementation used linear index comparison which gave false
|
|
6
|
+
* positives: a task at 'implementation' that went classified→implementation
|
|
7
|
+
* (skipping design_review) was incorrectly reported as having passed design_review.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const fsm_1 = require("../fsm");
|
|
11
|
+
const task_context_1 = require("../task-context");
|
|
12
|
+
function task(status, flags = {}) {
|
|
13
|
+
return {
|
|
14
|
+
...(0, task_context_1.createTaskContext)('test'),
|
|
15
|
+
status,
|
|
16
|
+
requiresArchitectureReview: flags.requiresArchitectureReview ?? false,
|
|
17
|
+
requiresSecurityReview: flags.requiresSecurityReview ?? false,
|
|
18
|
+
requiresQaApproval: flags.requiresQaApproval ?? false,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
describe('getCriticalPath (H-002)', () => {
|
|
22
|
+
const fsm = new fsm_1.TaskFSM();
|
|
23
|
+
it('returns only current status when already at commit_allowed', () => {
|
|
24
|
+
expect(fsm.getCriticalPath(task('commit_allowed'))).toEqual(['commit_allowed']);
|
|
25
|
+
});
|
|
26
|
+
it('returns only current status when rejected', () => {
|
|
27
|
+
expect(fsm.getCriticalPath(task('rejected'))).toEqual(['rejected']);
|
|
28
|
+
});
|
|
29
|
+
it('task with no gates: new → classified → implementation → approved → commit_allowed', () => {
|
|
30
|
+
const path = fsm.getCriticalPath(task('new'));
|
|
31
|
+
expect(path).toContain('classified');
|
|
32
|
+
expect(path).toContain('approved');
|
|
33
|
+
expect(path).toContain('commit_allowed');
|
|
34
|
+
expect(path).not.toContain('design_review');
|
|
35
|
+
expect(path).not.toContain('security_review');
|
|
36
|
+
expect(path).not.toContain('qa_review');
|
|
37
|
+
});
|
|
38
|
+
// ── The core H-002 bug: false positive on hasPassedGate ──────────────────
|
|
39
|
+
it('task at implementation with requiresArchitectureReview still needs design_review in path', () => {
|
|
40
|
+
// classified → implementation is allowed by FSM (guard only blocks
|
|
41
|
+
// non-classified/non-design_review sources), so implementation does NOT
|
|
42
|
+
// guarantee design_review was visited.
|
|
43
|
+
const t = task('implementation', { requiresArchitectureReview: true });
|
|
44
|
+
const path = fsm.getCriticalPath(t);
|
|
45
|
+
expect(path).toContain('design_review');
|
|
46
|
+
});
|
|
47
|
+
it('task at security_review with requiresArchitectureReview still needs design_review in path', () => {
|
|
48
|
+
const t = task('security_review', { requiresArchitectureReview: true });
|
|
49
|
+
const path = fsm.getCriticalPath(t);
|
|
50
|
+
expect(path).toContain('design_review');
|
|
51
|
+
});
|
|
52
|
+
it('task at implementation with requiresSecurityReview still needs security_review in path', () => {
|
|
53
|
+
const t = task('implementation', { requiresSecurityReview: true });
|
|
54
|
+
const path = fsm.getCriticalPath(t);
|
|
55
|
+
expect(path).toContain('security_review');
|
|
56
|
+
});
|
|
57
|
+
it('task at implementation with requiresQaApproval still needs qa_review in path', () => {
|
|
58
|
+
const t = task('implementation', { requiresQaApproval: true });
|
|
59
|
+
const path = fsm.getCriticalPath(t);
|
|
60
|
+
expect(path).toContain('qa_review');
|
|
61
|
+
});
|
|
62
|
+
// ── Correct true positives: post-approval guarantees all gates done ───────
|
|
63
|
+
it('task at approved no longer needs qa_review in path', () => {
|
|
64
|
+
const t = task('approved', { requiresQaApproval: true });
|
|
65
|
+
const path = fsm.getCriticalPath(t);
|
|
66
|
+
expect(path).not.toContain('qa_review');
|
|
67
|
+
});
|
|
68
|
+
it('task at commit_planning no longer needs any gate in path', () => {
|
|
69
|
+
const t = task('commit_planning', {
|
|
70
|
+
requiresArchitectureReview: true,
|
|
71
|
+
requiresSecurityReview: true,
|
|
72
|
+
requiresQaApproval: true,
|
|
73
|
+
});
|
|
74
|
+
const path = fsm.getCriticalPath(t);
|
|
75
|
+
expect(path).not.toContain('design_review');
|
|
76
|
+
expect(path).not.toContain('security_review');
|
|
77
|
+
expect(path).not.toContain('qa_review');
|
|
78
|
+
});
|
|
79
|
+
// ── FSM guard: security_review guarantees when requiresSecurityReview ─────
|
|
80
|
+
it('task at qa_review with requiresSecurityReview no longer needs security_review in path', () => {
|
|
81
|
+
// FSM guard: requiresSecurityReview && to=qa_review && status≠security_review → blocked
|
|
82
|
+
// So if task is at qa_review AND requiresSecurityReview, security_review was visited.
|
|
83
|
+
const t = task('qa_review', { requiresSecurityReview: true });
|
|
84
|
+
const path = fsm.getCriticalPath(t);
|
|
85
|
+
expect(path).not.toContain('security_review');
|
|
86
|
+
});
|
|
87
|
+
it('task at qa_review WITHOUT requiresSecurityReview: security_review correctly absent from path', () => {
|
|
88
|
+
const t = task('qa_review', { requiresSecurityReview: false });
|
|
89
|
+
const path = fsm.getCriticalPath(t);
|
|
90
|
+
expect(path).not.toContain('security_review');
|
|
91
|
+
});
|
|
92
|
+
it('path always ends with approved and commit_allowed for in-progress tasks', () => {
|
|
93
|
+
const t = task('classified', { requiresQaApproval: true });
|
|
94
|
+
const path = fsm.getCriticalPath(t);
|
|
95
|
+
const last = path[path.length - 1];
|
|
96
|
+
const secondLast = path[path.length - 2];
|
|
97
|
+
expect(last).toBe('commit_allowed');
|
|
98
|
+
expect(secondLast).toBe('approved');
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=fsm-critical-path.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-critical-path.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-critical-path.test.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gCAAiC;AACjC,kDAAsF;AAEtF,SAAS,I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e,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8FAA8F,EAAE,GAAG,EAAE;QACpG,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QAC/E,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACpC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-rework-and-regression.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fsm_1 = require("../fsm");
|
|
4
|
+
const task_context_1 = require("../task-context");
|
|
5
|
+
const inQaReview = () => {
|
|
6
|
+
let t = (0, task_context_1.createTaskContext)('x');
|
|
7
|
+
for (const s of ['classified', 'implementation', 'qa_review'])
|
|
8
|
+
t = (0, task_context_1.transitionTask)(t, s);
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
describe('TaskFSM — approved no longer regresses to implementation', () => {
|
|
12
|
+
it('refuses approved → implementation but still allows rework_required', () => {
|
|
13
|
+
const fsm = new fsm_1.TaskFSM();
|
|
14
|
+
const approved = (0, task_context_1.transitionTask)(inQaReview(), 'approved');
|
|
15
|
+
expect(fsm.transition(approved, 'implementation').allowed).toBe(false);
|
|
16
|
+
expect(fsm.getAvailableTransitions('approved')).not.toContain('implementation');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
describe('TaskFSM — rework cap', () => {
|
|
20
|
+
const cycle = (fsm, task) => {
|
|
21
|
+
const back = fsm.transition(task, 'rework_required');
|
|
22
|
+
if (!back.allowed)
|
|
23
|
+
return back;
|
|
24
|
+
return fsm.transition((0, task_context_1.transitionTask)(back.task, 'qa_review'), 'rework_required');
|
|
25
|
+
};
|
|
26
|
+
it('counts each entry into rework_required', () => {
|
|
27
|
+
const fsm = new fsm_1.TaskFSM();
|
|
28
|
+
const r = fsm.transition(inQaReview(), 'rework_required');
|
|
29
|
+
expect(r.task?.reworkCount).toBe(1);
|
|
30
|
+
});
|
|
31
|
+
it('refuses the transition once the default limit is reached, with a clear error', () => {
|
|
32
|
+
const fsm = new fsm_1.TaskFSM();
|
|
33
|
+
let task = inQaReview();
|
|
34
|
+
for (let i = 0; i < fsm_1.DEFAULT_MAX_REWORK; i++) {
|
|
35
|
+
const r = fsm.transition(task, 'rework_required');
|
|
36
|
+
expect(r.allowed).toBe(true);
|
|
37
|
+
task = (0, task_context_1.transitionTask)(r.task, 'qa_review');
|
|
38
|
+
}
|
|
39
|
+
const over = fsm.transition(task, 'rework_required');
|
|
40
|
+
expect(over.allowed).toBe(false);
|
|
41
|
+
expect(over.error).toMatch(/Límite de rework alcanzado \(5\)/);
|
|
42
|
+
expect(fsm.transition(task, 'rejected').allowed).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
it('the limit is configurable', () => {
|
|
45
|
+
const fsm = new fsm_1.TaskFSM({ maxRework: 1 });
|
|
46
|
+
const first = fsm.transition(inQaReview(), 'rework_required');
|
|
47
|
+
expect(first.allowed).toBe(true);
|
|
48
|
+
expect(cycle(fsm, first.task).allowed).toBe(false);
|
|
49
|
+
});
|
|
50
|
+
it('a task never reworked starts at zero (field is optional for existing callers)', () => {
|
|
51
|
+
expect(inQaReview().reworkCount).toBeUndefined();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=fsm-rework-and-regression.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fsm-rework-and-regression.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.ts"],"names":[],"mappings":";;AAAA,gCAAqD;AACrD,kDAAoE;AAGpE,MAAM,UAAU,GAAG,GAAgB,EAAE;IACjC,IAAI,CAAC,GAAG,IAAA,gCAAiB,EAAC,GAAG,CAAC,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,CAAU;QAAE,CAAC,GAAG,IAAA,6BAAc,EAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjG,OAAO,CAAC,CAAC;AACb,CAAC,CAAC;AAEF,QAAQ,CAAC,0DAA0D,EAAE,GAAG,EAAE;IACtE,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;QAC1E,MAAM,GAAG,GAAG,IAAI,aAAO,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAA,6BAAc,EAAC,UAAU,EAAE,EAAE,UAAU,CAAC,CAAC;QAC1D,MAAM,CAAC,GAAG,CA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detector-llm.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/intent-detector-llm.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const intent_detector_1 = require("../intent-detector");
|
|
4
|
+
const agent_core_1 = require("@backendkit-labs/agent-core");
|
|
5
|
+
/** SPEC-0001 §5 (ADR-0003): the LLM tie-breaker answers a schema-checked object, no regex. */
|
|
6
|
+
// No keyword in the text, so the LLM classifier is the one that decides.
|
|
7
|
+
const NO_SIGNAL = 'zzz qqq xxx';
|
|
8
|
+
function client(answers) {
|
|
9
|
+
const calls = [];
|
|
10
|
+
const c = {
|
|
11
|
+
async chat(messages, _tools, _temperature, options) {
|
|
12
|
+
calls.push({ messages: messages.map(m => ({ ...m })), options });
|
|
13
|
+
return { content: answers.shift() ?? null };
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
return { c, calls };
|
|
17
|
+
}
|
|
18
|
+
describe('intent-detector LLM classification', () => {
|
|
19
|
+
it('reads the action from a JSON object', async () => {
|
|
20
|
+
const { c, calls } = client(['{"action":"design"}']);
|
|
21
|
+
const r = await (0, intent_detector_1.detectIntent)(NO_SIGNAL, c);
|
|
22
|
+
expect(r).toMatchObject({ actionType: 'design', method: 'llm' });
|
|
23
|
+
expect(r.scores.design).toBeGreaterThanOrEqual(3);
|
|
24
|
+
expect(calls[0].options?.responseFormat?.name).toBe('response');
|
|
25
|
+
expect(JSON.stringify(calls[0].options?.responseFormat?.schema)).toContain('design');
|
|
26
|
+
});
|
|
27
|
+
it('does not depend on the exact formatting of the JSON', async () => {
|
|
28
|
+
const { c } = client(['```json\n{ "action" : "implementation" }\n```']);
|
|
29
|
+
expect((await (0, intent_detector_1.detectIntent)(NO_SIGNAL, c)).actionType).toBe('implementation');
|
|
30
|
+
});
|
|
31
|
+
it('a response that is not JSON gets one corrective retry, then falls back to unknown', async () => {
|
|
32
|
+
const { c, calls } = client(['I think this is a design task', 'still not json']);
|
|
33
|
+
const r = await (0, intent_detector_1.detectIntent)(NO_SIGNAL, c);
|
|
34
|
+
expect(r.actionType).toBe('unknown');
|
|
35
|
+
expect(r.method).toBe('llm');
|
|
36
|
+
expect(calls).toHaveLength(2);
|
|
37
|
+
});
|
|
38
|
+
it('recovers when the retry is valid', async () => {
|
|
39
|
+
const { c, calls } = client(['no idea', '{"action":"design"}']);
|
|
40
|
+
expect((await (0, intent_detector_1.detectIntent)(NO_SIGNAL, c)).actionType).toBe('design');
|
|
41
|
+
expect(calls).toHaveLength(2);
|
|
42
|
+
});
|
|
43
|
+
it('an action outside the allowed list is rejected', async () => {
|
|
44
|
+
const { c } = client(['{"action":"banana"}', '{"action":"banana"}']);
|
|
45
|
+
expect((await (0, intent_detector_1.detectIntent)(NO_SIGNAL, c)).actionType).toBe('unknown');
|
|
46
|
+
});
|
|
47
|
+
it('adaptProviderToLLMClient forwards the chat options to the provider', async () => {
|
|
48
|
+
let received;
|
|
49
|
+
const provider = {
|
|
50
|
+
async chat(_m, _t, cb, options) { received = options; cb.onChunk?.('{"action":"design"}'); cb.onDone({ role: 'assistant', content: null }); },
|
|
51
|
+
};
|
|
52
|
+
const r = await (0, intent_detector_1.detectIntent)(NO_SIGNAL, (0, agent_core_1.adaptProviderToLLMClient)(provider));
|
|
53
|
+
expect(r.actionType).toBe('design');
|
|
54
|
+
expect(received?.responseFormat?.type).toBe('json_schema');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=intent-detector-llm.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-detector-llm.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/intent-detector-llm.test.ts"],"names":[],"mappings":";;AAAA,wDAAsE;AACtE,4DAAuE;AAGvE,8FAA8F;AAE9F,yEAAyE;AACzE,MAAM,SAAS,GAAG,aAAa,CAAC;AAE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KAAK,IAAI,EAAE;QAC5D,MAAM,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACrE,MAAM,CAAC,CAAC,MAAM,IAAA,8BAAY,EAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oEAAoE,EAAE,KAAK,IAAI,EAAE;QAChF,IAAI,QAAiC,CAAC;QACtC,MAAM,QAAQ,GAAgB;YAC1B,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,IAAI,QAAQ,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SAChJ,CAAC;QACF,MAAM,CAAC,GAAG,MAAM,IAAA,8BAAY,EAAC,SAAS,EAAE,IAAA,qCAAwB,EAAC,QAAQ,CAAC,CAAC,CAAC;QAC5E,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for computeKeywordScores cap (H-006).
|
|
3
|
+
*
|
|
4
|
+
* Previously scores accumulated without limit. A long text mentioning many
|
|
5
|
+
* implementation keywords could score 30-40, dwarfing the 2-point margin
|
|
6
|
+
* used to declare a clear winner. The fix caps each action at MAX_KEYWORD_SCORE=15.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=intent-detector-scores.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-detector-scores.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/intent-detector-scores.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tests for computeKeywordScores cap (H-006).
|
|
4
|
+
*
|
|
5
|
+
* Previously scores accumulated without limit. A long text mentioning many
|
|
6
|
+
* implementation keywords could score 30-40, dwarfing the 2-point margin
|
|
7
|
+
* used to declare a clear winner. The fix caps each action at MAX_KEYWORD_SCORE=15.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const intent_detector_1 = require("../intent-detector");
|
|
11
|
+
describe('computeKeywordScores — MAX_KEYWORD_SCORE cap (H-006)', () => {
|
|
12
|
+
it('no score exceeds 15 regardless of how many matching keywords are in the text', async () => {
|
|
13
|
+
// A text that repeats many implementation keywords
|
|
14
|
+
const longText = Array(20).fill('implementar develop build create add feature endpoint api').join(' ');
|
|
15
|
+
const result = await (0, intent_detector_1.detectIntent)(longText);
|
|
16
|
+
for (const [action, score] of Object.entries(result.scores)) {
|
|
17
|
+
expect(score).toBeLessThanOrEqual(15);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
it('confidence is always in [0, 1] even with highly keyword-dense input', async () => {
|
|
21
|
+
const dense = Array(30).fill('fix bug error corregir arreglar problema').join(' ');
|
|
22
|
+
const result = await (0, intent_detector_1.detectIntent)(dense);
|
|
23
|
+
expect(result.confidence).toBeGreaterThanOrEqual(0);
|
|
24
|
+
expect(result.confidence).toBeLessThanOrEqual(1);
|
|
25
|
+
});
|
|
26
|
+
it('discriminates correctly between two competing categories at high keyword density', async () => {
|
|
27
|
+
// Even when both implementation and bugfix have many keywords, the margin
|
|
28
|
+
// logic still works because both are capped and their relative scores remain meaningful.
|
|
29
|
+
const text = 'implementar fix bug error desarrollar codigo endpoint corregir';
|
|
30
|
+
const result = await (0, intent_detector_1.detectIntent)(text);
|
|
31
|
+
// The winner must have a score <= MAX and confidence in [0,1]
|
|
32
|
+
const winnerScore = result.scores[result.actionType] ?? 0;
|
|
33
|
+
expect(winnerScore).toBeLessThanOrEqual(15);
|
|
34
|
+
expect(result.confidence).toBeLessThanOrEqual(1);
|
|
35
|
+
});
|
|
36
|
+
it('a short focused text still classifies correctly after capping', async () => {
|
|
37
|
+
const result = await (0, intent_detector_1.detectIntent)('implementar nuevo endpoint REST');
|
|
38
|
+
// Should classify as implementation or similar, not garbage
|
|
39
|
+
expect(result.actionType).toBeTruthy();
|
|
40
|
+
expect(result.confidence).toBeGreaterThan(0);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=intent-detector-scores.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-detector-scores.test.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/intent-detector-scores.test.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,wDAAkD;AAElD,QAAQ,CAAC,sDAAsD,EAAE,GAAG,EAAE;IAClE,EAAE,CAAC,8EAA8E,EAAE,KAAK,IAAI,EAAE;QAC1F,mDAAmD;QACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAC3B,2DAA2D,CAC9D,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEZ,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAC;QAE5C,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1D,MAAM,CAAC,KAAK,CAAC,CAAC,mBA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AAC;IACjD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration test: PolicyPromoter → manifest.yaml → Orchestrator.loadManifestPolicyRules → applyPolicies
|
|
3
|
+
*
|
|
4
|
+
* Verifies the closed feedback loop:
|
|
5
|
+
* 1. ReflectionEngine promotes a detected pattern to manifest.yaml via PolicyPromoter
|
|
6
|
+
* 2. Orchestrator reads manifest.yaml on every orchestrate() call (PolicyStep)
|
|
7
|
+
* 3. The promoted rule fires for matching input and enriches the task context
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=reflection-cycle.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflection-cycle.test.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/__tests__/reflection-cycle.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|