@amsterdamdatalabs/enact-factory 0.1.1
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/LICENSE +674 -0
- package/README.md +566 -0
- package/dist/adapters/agenticLoop.d.ts +90 -0
- package/dist/adapters/agenticLoop.d.ts.map +1 -0
- package/dist/adapters/agenticLoop.js +219 -0
- package/dist/adapters/agenticLoop.js.map +1 -0
- package/dist/adapters/base.d.ts +16 -0
- package/dist/adapters/base.d.ts.map +1 -0
- package/dist/adapters/base.js +135 -0
- package/dist/adapters/base.js.map +1 -0
- package/dist/adapters/claude.d.ts +13 -0
- package/dist/adapters/claude.d.ts.map +1 -0
- package/dist/adapters/claude.js +318 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/codex.d.ts +14 -0
- package/dist/adapters/codex.d.ts.map +1 -0
- package/dist/adapters/codex.js +366 -0
- package/dist/adapters/codex.js.map +1 -0
- package/dist/adapters/cryptoQuantAdapter.d.ts +85 -0
- package/dist/adapters/cryptoQuantAdapter.d.ts.map +1 -0
- package/dist/adapters/cryptoQuantAdapter.js +238 -0
- package/dist/adapters/cryptoQuantAdapter.js.map +1 -0
- package/dist/adapters/cursor.d.ts +13 -0
- package/dist/adapters/cursor.d.ts.map +1 -0
- package/dist/adapters/cursor.js +300 -0
- package/dist/adapters/cursor.js.map +1 -0
- package/dist/adapters/envPath.d.ts +20 -0
- package/dist/adapters/envPath.d.ts.map +1 -0
- package/dist/adapters/envPath.js +49 -0
- package/dist/adapters/envPath.js.map +1 -0
- package/dist/adapters/hermes.d.ts +13 -0
- package/dist/adapters/hermes.d.ts.map +1 -0
- package/dist/adapters/hermes.js +283 -0
- package/dist/adapters/hermes.js.map +1 -0
- package/dist/adapters/index.d.ts +18 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +56 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/opencode.d.ts +13 -0
- package/dist/adapters/opencode.d.ts.map +1 -0
- package/dist/adapters/opencode.js +282 -0
- package/dist/adapters/opencode.js.map +1 -0
- package/dist/adapters/processRegistry.d.ts +38 -0
- package/dist/adapters/processRegistry.d.ts.map +1 -0
- package/dist/adapters/processRegistry.js +147 -0
- package/dist/adapters/processRegistry.js.map +1 -0
- package/dist/adapters/responses.d.ts +16 -0
- package/dist/adapters/responses.d.ts.map +1 -0
- package/dist/adapters/responses.js +244 -0
- package/dist/adapters/responses.js.map +1 -0
- package/dist/adapters/streamBuffer.d.ts +59 -0
- package/dist/adapters/streamBuffer.d.ts.map +1 -0
- package/dist/adapters/streamBuffer.js +123 -0
- package/dist/adapters/streamBuffer.js.map +1 -0
- package/dist/adapters/tools.d.ts +30 -0
- package/dist/adapters/tools.d.ts.map +1 -0
- package/dist/adapters/tools.js +219 -0
- package/dist/adapters/tools.js.map +1 -0
- package/dist/adapters/types.d.ts +82 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +6 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/agents/agentBus.d.ts +160 -0
- package/dist/agents/agentBus.d.ts.map +1 -0
- package/dist/agents/agentBus.js +350 -0
- package/dist/agents/agentBus.js.map +1 -0
- package/dist/agents/agentPair.d.ts +215 -0
- package/dist/agents/agentPair.d.ts.map +1 -0
- package/dist/agents/agentPair.js +456 -0
- package/dist/agents/agentPair.js.map +1 -0
- package/dist/agents/auditor.d.ts +27 -0
- package/dist/agents/auditor.d.ts.map +1 -0
- package/dist/agents/auditor.js +238 -0
- package/dist/agents/auditor.js.map +1 -0
- package/dist/agents/cliStreamParser.d.ts +18 -0
- package/dist/agents/cliStreamParser.d.ts.map +1 -0
- package/dist/agents/cliStreamParser.js +156 -0
- package/dist/agents/cliStreamParser.js.map +1 -0
- package/dist/agents/documenter.d.ts +31 -0
- package/dist/agents/documenter.d.ts.map +1 -0
- package/dist/agents/documenter.js +286 -0
- package/dist/agents/documenter.js.map +1 -0
- package/dist/agents/draftAnalyzer.d.ts +50 -0
- package/dist/agents/draftAnalyzer.d.ts.map +1 -0
- package/dist/agents/draftAnalyzer.js +289 -0
- package/dist/agents/draftAnalyzer.js.map +1 -0
- package/dist/agents/evaluator.d.ts +61 -0
- package/dist/agents/evaluator.d.ts.map +1 -0
- package/dist/agents/evaluator.js +338 -0
- package/dist/agents/evaluator.js.map +1 -0
- package/dist/agents/executor.d.ts +33 -0
- package/dist/agents/executor.d.ts.map +1 -0
- package/dist/agents/executor.js +130 -0
- package/dist/agents/executor.js.map +1 -0
- package/dist/agents/index.d.ts +10 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +10 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/pairMetrics.d.ts +63 -0
- package/dist/agents/pairMetrics.d.ts.map +1 -0
- package/dist/agents/pairMetrics.js +232 -0
- package/dist/agents/pairMetrics.js.map +1 -0
- package/dist/agents/pairPipeline.d.ts +184 -0
- package/dist/agents/pairPipeline.d.ts.map +1 -0
- package/dist/agents/pairPipeline.js +934 -0
- package/dist/agents/pairPipeline.js.map +1 -0
- package/dist/agents/pairWebhook.d.ts +59 -0
- package/dist/agents/pairWebhook.d.ts.map +1 -0
- package/dist/agents/pairWebhook.js +242 -0
- package/dist/agents/pairWebhook.js.map +1 -0
- package/dist/agents/pipelineFormat.d.ts +8 -0
- package/dist/agents/pipelineFormat.d.ts.map +1 -0
- package/dist/agents/pipelineFormat.js +65 -0
- package/dist/agents/pipelineFormat.js.map +1 -0
- package/dist/agents/pipelineGuards.d.ts +23 -0
- package/dist/agents/pipelineGuards.d.ts.map +1 -0
- package/dist/agents/pipelineGuards.js +257 -0
- package/dist/agents/pipelineGuards.js.map +1 -0
- package/dist/agents/reviewer.d.ts +37 -0
- package/dist/agents/reviewer.d.ts.map +1 -0
- package/dist/agents/reviewer.js +214 -0
- package/dist/agents/reviewer.js.map +1 -0
- package/dist/agents/skillDocumenter.d.ts +23 -0
- package/dist/agents/skillDocumenter.d.ts.map +1 -0
- package/dist/agents/skillDocumenter.js +219 -0
- package/dist/agents/skillDocumenter.js.map +1 -0
- package/dist/agents/tester.d.ts +37 -0
- package/dist/agents/tester.d.ts.map +1 -0
- package/dist/agents/tester.js +309 -0
- package/dist/agents/tester.js.map +1 -0
- package/dist/automation/autonomousRunner.d.ts +145 -0
- package/dist/automation/autonomousRunner.d.ts.map +1 -0
- package/dist/automation/autonomousRunner.js +1272 -0
- package/dist/automation/autonomousRunner.js.map +1 -0
- package/dist/automation/dailyReporter.d.ts +26 -0
- package/dist/automation/dailyReporter.d.ts.map +1 -0
- package/dist/automation/dailyReporter.js +130 -0
- package/dist/automation/dailyReporter.js.map +1 -0
- package/dist/automation/index.d.ts +5 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +5 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/longRunningMonitor.d.ts +26 -0
- package/dist/automation/longRunningMonitor.d.ts.map +1 -0
- package/dist/automation/longRunningMonitor.js +356 -0
- package/dist/automation/longRunningMonitor.js.map +1 -0
- package/dist/automation/prOwnership.d.ts +18 -0
- package/dist/automation/prOwnership.d.ts.map +1 -0
- package/dist/automation/prOwnership.js +61 -0
- package/dist/automation/prOwnership.js.map +1 -0
- package/dist/automation/runnerExecution.d.ts +57 -0
- package/dist/automation/runnerExecution.d.ts.map +1 -0
- package/dist/automation/runnerExecution.js +701 -0
- package/dist/automation/runnerExecution.js.map +1 -0
- package/dist/automation/runnerState.d.ts +170 -0
- package/dist/automation/runnerState.d.ts.map +1 -0
- package/dist/automation/runnerState.js +496 -0
- package/dist/automation/runnerState.js.map +1 -0
- package/dist/automation/runnerTypes.d.ts +57 -0
- package/dist/automation/runnerTypes.d.ts.map +1 -0
- package/dist/automation/runnerTypes.js +5 -0
- package/dist/automation/runnerTypes.js.map +1 -0
- package/dist/automation/scheduler.d.ts +75 -0
- package/dist/automation/scheduler.d.ts.map +1 -0
- package/dist/automation/scheduler.js +402 -0
- package/dist/automation/scheduler.js.map +1 -0
- package/dist/azdo/azdo.d.ts +70 -0
- package/dist/azdo/azdo.d.ts.map +1 -0
- package/dist/azdo/azdo.js +328 -0
- package/dist/azdo/azdo.js.map +1 -0
- package/dist/azdo/index.d.ts +3 -0
- package/dist/azdo/index.d.ts.map +1 -0
- package/dist/azdo/index.js +3 -0
- package/dist/azdo/index.js.map +1 -0
- package/dist/azdo/projectUpdater.d.ts +13 -0
- package/dist/azdo/projectUpdater.d.ts.map +1 -0
- package/dist/azdo/projectUpdater.js +155 -0
- package/dist/azdo/projectUpdater.js.map +1 -0
- package/dist/azureDevOps/client.d.ts +75 -0
- package/dist/azureDevOps/client.d.ts.map +1 -0
- package/dist/azureDevOps/client.js +150 -0
- package/dist/azureDevOps/client.js.map +1 -0
- package/dist/azureDevOps/hierarchy.d.ts +119 -0
- package/dist/azureDevOps/hierarchy.d.ts.map +1 -0
- package/dist/azureDevOps/hierarchy.js +470 -0
- package/dist/azureDevOps/hierarchy.js.map +1 -0
- package/dist/azureDevOps/mapper.d.ts +101 -0
- package/dist/azureDevOps/mapper.d.ts.map +1 -0
- package/dist/azureDevOps/mapper.js +438 -0
- package/dist/azureDevOps/mapper.js.map +1 -0
- package/dist/azureDevOps/stateMapping.d.ts +15 -0
- package/dist/azureDevOps/stateMapping.d.ts.map +1 -0
- package/dist/azureDevOps/stateMapping.js +141 -0
- package/dist/azureDevOps/stateMapping.js.map +1 -0
- package/dist/cli/authHandler.d.ts +13 -0
- package/dist/cli/authHandler.d.ts.map +1 -0
- package/dist/cli/authHandler.js +70 -0
- package/dist/cli/authHandler.js.map +1 -0
- package/dist/cli/checkHandler.d.ts +27 -0
- package/dist/cli/checkHandler.d.ts.map +1 -0
- package/dist/cli/checkHandler.js +560 -0
- package/dist/cli/checkHandler.js.map +1 -0
- package/dist/cli/daemon.d.ts +30 -0
- package/dist/cli/daemon.d.ts.map +1 -0
- package/dist/cli/daemon.js +141 -0
- package/dist/cli/daemon.js.map +1 -0
- package/dist/cli/factoryCommands.d.ts +3 -0
- package/dist/cli/factoryCommands.d.ts.map +1 -0
- package/dist/cli/factoryCommands.js +165 -0
- package/dist/cli/factoryCommands.js.map +1 -0
- package/dist/cli/promptHandler.d.ts +13 -0
- package/dist/cli/promptHandler.d.ts.map +1 -0
- package/dist/cli/promptHandler.js +193 -0
- package/dist/cli/promptHandler.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +320 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/agentLifecycle.d.ts +322 -0
- package/dist/core/agentLifecycle.d.ts.map +1 -0
- package/dist/core/agentLifecycle.js +230 -0
- package/dist/core/agentLifecycle.js.map +1 -0
- package/dist/core/areaMapping.d.ts +9 -0
- package/dist/core/areaMapping.d.ts.map +1 -0
- package/dist/core/areaMapping.js +37 -0
- package/dist/core/areaMapping.js.map +1 -0
- package/dist/core/config.d.ts +469 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +780 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/dashboardContract.d.ts +204 -0
- package/dist/core/dashboardContract.d.ts.map +1 -0
- package/dist/core/dashboardContract.js +205 -0
- package/dist/core/dashboardContract.js.map +1 -0
- package/dist/core/devopsModel.d.ts +138 -0
- package/dist/core/devopsModel.d.ts.map +1 -0
- package/dist/core/devopsModel.js +137 -0
- package/dist/core/devopsModel.js.map +1 -0
- package/dist/core/envFile.d.ts +11 -0
- package/dist/core/envFile.d.ts.map +1 -0
- package/dist/core/envFile.js +104 -0
- package/dist/core/envFile.js.map +1 -0
- package/dist/core/eventHub.d.ts +220 -0
- package/dist/core/eventHub.d.ts.map +1 -0
- package/dist/core/eventHub.js +136 -0
- package/dist/core/eventHub.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +7 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/laneExecutionState.d.ts +29 -0
- package/dist/core/laneExecutionState.d.ts.map +1 -0
- package/dist/core/laneExecutionState.js +18 -0
- package/dist/core/laneExecutionState.js.map +1 -0
- package/dist/core/laneStatus.d.ts +49 -0
- package/dist/core/laneStatus.d.ts.map +1 -0
- package/dist/core/laneStatus.js +153 -0
- package/dist/core/laneStatus.js.map +1 -0
- package/dist/core/prSidecar.d.ts +96 -0
- package/dist/core/prSidecar.d.ts.map +1 -0
- package/dist/core/prSidecar.js +33 -0
- package/dist/core/prSidecar.js.map +1 -0
- package/dist/core/runtimeConfig.d.ts +6 -0
- package/dist/core/runtimeConfig.d.ts.map +1 -0
- package/dist/core/runtimeConfig.js +24 -0
- package/dist/core/runtimeConfig.js.map +1 -0
- package/dist/core/scmProvider.d.ts +19 -0
- package/dist/core/scmProvider.d.ts.map +1 -0
- package/dist/core/scmProvider.js +38 -0
- package/dist/core/scmProvider.js.map +1 -0
- package/dist/core/service.d.ts +10 -0
- package/dist/core/service.d.ts.map +1 -0
- package/dist/core/service.js +297 -0
- package/dist/core/service.js.map +1 -0
- package/dist/core/traceCollector.d.ts +105 -0
- package/dist/core/traceCollector.d.ts.map +1 -0
- package/dist/core/traceCollector.js +141 -0
- package/dist/core/traceCollector.js.map +1 -0
- package/dist/core/types.d.ts +432 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/workItemMapper.d.ts +39 -0
- package/dist/core/workItemMapper.d.ts.map +1 -0
- package/dist/core/workItemMapper.js +427 -0
- package/dist/core/workItemMapper.js.map +1 -0
- package/dist/core/workItemModel.d.ts +120 -0
- package/dist/core/workItemModel.d.ts.map +1 -0
- package/dist/core/workItemModel.js +104 -0
- package/dist/core/workItemModel.js.map +1 -0
- package/dist/core/workItemPayload.d.ts +195 -0
- package/dist/core/workItemPayload.d.ts.map +1 -0
- package/dist/core/workItemPayload.js +24 -0
- package/dist/core/workItemPayload.js.map +1 -0
- package/dist/core/workspaceConfig.d.ts +57 -0
- package/dist/core/workspaceConfig.d.ts.map +1 -0
- package/dist/core/workspaceConfig.js +184 -0
- package/dist/core/workspaceConfig.js.map +1 -0
- package/dist/doctor.d.ts +18 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +34 -0
- package/dist/doctor.js.map +1 -0
- package/dist/factory/activeSkill.d.ts +11 -0
- package/dist/factory/activeSkill.d.ts.map +1 -0
- package/dist/factory/activeSkill.js +44 -0
- package/dist/factory/activeSkill.js.map +1 -0
- package/dist/factory/assignment.d.ts +54 -0
- package/dist/factory/assignment.d.ts.map +1 -0
- package/dist/factory/assignment.js +94 -0
- package/dist/factory/assignment.js.map +1 -0
- package/dist/factory/auditLog.d.ts +10 -0
- package/dist/factory/auditLog.d.ts.map +1 -0
- package/dist/factory/auditLog.js +38 -0
- package/dist/factory/auditLog.js.map +1 -0
- package/dist/factory/closureRequirements.d.ts +12 -0
- package/dist/factory/closureRequirements.d.ts.map +1 -0
- package/dist/factory/closureRequirements.js +30 -0
- package/dist/factory/closureRequirements.js.map +1 -0
- package/dist/factory/delegationPrompt.d.ts +3 -0
- package/dist/factory/delegationPrompt.d.ts.map +1 -0
- package/dist/factory/delegationPrompt.js +16 -0
- package/dist/factory/delegationPrompt.js.map +1 -0
- package/dist/factory/http.d.ts +3 -0
- package/dist/factory/http.d.ts.map +1 -0
- package/dist/factory/http.js +555 -0
- package/dist/factory/http.js.map +1 -0
- package/dist/factory/lifecyclePushMap.d.ts +4 -0
- package/dist/factory/lifecyclePushMap.d.ts.map +1 -0
- package/dist/factory/lifecyclePushMap.js +7 -0
- package/dist/factory/lifecyclePushMap.js.map +1 -0
- package/dist/factory/missions.d.ts +125 -0
- package/dist/factory/missions.d.ts.map +1 -0
- package/dist/factory/missions.js +304 -0
- package/dist/factory/missions.js.map +1 -0
- package/dist/factory/mode.d.ts +9 -0
- package/dist/factory/mode.d.ts.map +1 -0
- package/dist/factory/mode.js +30 -0
- package/dist/factory/mode.js.map +1 -0
- package/dist/factory/operatorActiveSkill.d.ts +15 -0
- package/dist/factory/operatorActiveSkill.d.ts.map +1 -0
- package/dist/factory/operatorActiveSkill.js +95 -0
- package/dist/factory/operatorActiveSkill.js.map +1 -0
- package/dist/factory/paseoDispatcher.d.ts +52 -0
- package/dist/factory/paseoDispatcher.d.ts.map +1 -0
- package/dist/factory/paseoDispatcher.js +122 -0
- package/dist/factory/paseoDispatcher.js.map +1 -0
- package/dist/factory/paseoLifecycle.d.ts +32 -0
- package/dist/factory/paseoLifecycle.d.ts.map +1 -0
- package/dist/factory/paseoLifecycle.js +260 -0
- package/dist/factory/paseoLifecycle.js.map +1 -0
- package/dist/factory/paths.d.ts +31 -0
- package/dist/factory/paths.d.ts.map +1 -0
- package/dist/factory/paths.js +139 -0
- package/dist/factory/paths.js.map +1 -0
- package/dist/factory/progressWatchdog.d.ts +58 -0
- package/dist/factory/progressWatchdog.d.ts.map +1 -0
- package/dist/factory/progressWatchdog.js +160 -0
- package/dist/factory/progressWatchdog.js.map +1 -0
- package/dist/factory/roster.d.ts +59 -0
- package/dist/factory/roster.d.ts.map +1 -0
- package/dist/factory/roster.js +116 -0
- package/dist/factory/roster.js.map +1 -0
- package/dist/factory/runtime.d.ts +44 -0
- package/dist/factory/runtime.d.ts.map +1 -0
- package/dist/factory/runtime.js +238 -0
- package/dist/factory/runtime.js.map +1 -0
- package/dist/factory/sync.d.ts +29 -0
- package/dist/factory/sync.d.ts.map +1 -0
- package/dist/factory/sync.js +77 -0
- package/dist/factory/sync.js.map +1 -0
- package/dist/factory/workitemQueues.d.ts +37 -0
- package/dist/factory/workitemQueues.d.ts.map +1 -0
- package/dist/factory/workitemQueues.js +99 -0
- package/dist/factory/workitemQueues.js.map +1 -0
- package/dist/factory/workitemTriage.d.ts +9 -0
- package/dist/factory/workitemTriage.d.ts.map +1 -0
- package/dist/factory/workitemTriage.js +81 -0
- package/dist/factory/workitemTriage.js.map +1 -0
- package/dist/hooks.d.ts +18 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +96 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -0
- package/dist/install/agentCatalog.d.ts +7 -0
- package/dist/install/agentCatalog.d.ts.map +1 -0
- package/dist/install/agentCatalog.js +28 -0
- package/dist/install/agentCatalog.js.map +1 -0
- package/dist/install/bundlePaths.d.ts +10 -0
- package/dist/install/bundlePaths.d.ts.map +1 -0
- package/dist/install/bundlePaths.js +30 -0
- package/dist/install/bundlePaths.js.map +1 -0
- package/dist/install/codex.d.ts +43 -0
- package/dist/install/codex.d.ts.map +1 -0
- package/dist/install/codex.js +207 -0
- package/dist/install/codex.js.map +1 -0
- package/dist/install/enactHome.d.ts +37 -0
- package/dist/install/enactHome.d.ts.map +1 -0
- package/dist/install/enactHome.js +152 -0
- package/dist/install/enactHome.js.map +1 -0
- package/dist/install/plugins.d.ts +115 -0
- package/dist/install/plugins.d.ts.map +1 -0
- package/dist/install/plugins.js +259 -0
- package/dist/install/plugins.js.map +1 -0
- package/dist/install/setup.d.ts +33 -0
- package/dist/install/setup.d.ts.map +1 -0
- package/dist/install/setup.js +167 -0
- package/dist/install/setup.js.map +1 -0
- package/dist/locale/en.d.ts +3 -0
- package/dist/locale/en.d.ts.map +1 -0
- package/dist/locale/en.js +435 -0
- package/dist/locale/en.js.map +1 -0
- package/dist/locale/index.d.ts +28 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +84 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/locale/prompts/en.d.ts +3 -0
- package/dist/locale/prompts/en.d.ts.map +1 -0
- package/dist/locale/prompts/en.js +254 -0
- package/dist/locale/prompts/en.js.map +1 -0
- package/dist/locale/types.d.ts +433 -0
- package/dist/locale/types.d.ts.map +1 -0
- package/dist/locale/types.js +5 -0
- package/dist/locale/types.js.map +1 -0
- package/dist/mcp/server.d.ts +489 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +597 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/orchestration/decisionEngine.d.ts +175 -0
- package/dist/orchestration/decisionEngine.d.ts.map +1 -0
- package/dist/orchestration/decisionEngine.js +471 -0
- package/dist/orchestration/decisionEngine.js.map +1 -0
- package/dist/orchestration/index.d.ts +5 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +5 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/workItemParser.d.ts +67 -0
- package/dist/orchestration/workItemParser.d.ts.map +1 -0
- package/dist/orchestration/workItemParser.js +560 -0
- package/dist/orchestration/workItemParser.js.map +1 -0
- package/dist/orchestration/workItemScheduler.d.ts +141 -0
- package/dist/orchestration/workItemScheduler.d.ts.map +1 -0
- package/dist/orchestration/workItemScheduler.js +317 -0
- package/dist/orchestration/workItemScheduler.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +145 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +301 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/providers/codexSessions.d.ts +93 -0
- package/dist/providers/codexSessions.d.ts.map +1 -0
- package/dist/providers/codexSessions.js +366 -0
- package/dist/providers/codexSessions.js.map +1 -0
- package/dist/registry/bsDetector.d.ts +24 -0
- package/dist/registry/bsDetector.d.ts.map +1 -0
- package/dist/registry/bsDetector.js +276 -0
- package/dist/registry/bsDetector.js.map +1 -0
- package/dist/registry/entityScanner.d.ts +36 -0
- package/dist/registry/entityScanner.d.ts.map +1 -0
- package/dist/registry/entityScanner.js +693 -0
- package/dist/registry/entityScanner.js.map +1 -0
- package/dist/registry/index.d.ts +9 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +13 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/schema.d.ts +307 -0
- package/dist/registry/schema.d.ts.map +1 -0
- package/dist/registry/schema.js +139 -0
- package/dist/registry/schema.js.map +1 -0
- package/dist/registry/sqliteStore.d.ts +101 -0
- package/dist/registry/sqliteStore.d.ts.map +1 -0
- package/dist/registry/sqliteStore.js +688 -0
- package/dist/registry/sqliteStore.js.map +1 -0
- package/dist/registry/workItemBridge.d.ts +8 -0
- package/dist/registry/workItemBridge.d.ts.map +1 -0
- package/dist/registry/workItemBridge.js +30 -0
- package/dist/registry/workItemBridge.js.map +1 -0
- package/dist/runners/cliRunner.d.ts +11 -0
- package/dist/runners/cliRunner.d.ts.map +1 -0
- package/dist/runners/cliRunner.js +193 -0
- package/dist/runners/cliRunner.js.map +1 -0
- package/dist/support/apiCache.d.ts +85 -0
- package/dist/support/apiCache.d.ts.map +1 -0
- package/dist/support/apiCache.js +163 -0
- package/dist/support/apiCache.js.map +1 -0
- package/dist/support/chat.d.ts +3 -0
- package/dist/support/chat.d.ts.map +1 -0
- package/dist/support/chat.js +305 -0
- package/dist/support/chat.js.map +1 -0
- package/dist/support/chatBackend.d.ts +25 -0
- package/dist/support/chatBackend.d.ts.map +1 -0
- package/dist/support/chatBackend.js +289 -0
- package/dist/support/chatBackend.js.map +1 -0
- package/dist/support/chatTui.d.ts +3 -0
- package/dist/support/chatTui.d.ts.map +1 -0
- package/dist/support/chatTui.js +1082 -0
- package/dist/support/chatTui.js.map +1 -0
- package/dist/support/costTracker.d.ts +29 -0
- package/dist/support/costTracker.d.ts.map +1 -0
- package/dist/support/costTracker.js +113 -0
- package/dist/support/costTracker.js.map +1 -0
- package/dist/support/dashboardHtml.d.ts +5 -0
- package/dist/support/dashboardHtml.d.ts.map +1 -0
- package/dist/support/dashboardHtml.js +2629 -0
- package/dist/support/dashboardHtml.js.map +1 -0
- package/dist/support/dev.d.ts +55 -0
- package/dist/support/dev.d.ts.map +1 -0
- package/dist/support/dev.js +298 -0
- package/dist/support/dev.js.map +1 -0
- package/dist/support/editParser.d.ts +37 -0
- package/dist/support/editParser.d.ts.map +1 -0
- package/dist/support/editParser.js +365 -0
- package/dist/support/editParser.js.map +1 -0
- package/dist/support/ghosttyThemeCatalog.generated.d.ts +2 -0
- package/dist/support/ghosttyThemeCatalog.generated.d.ts.map +1 -0
- package/dist/support/ghosttyThemeCatalog.generated.js +11116 -0
- package/dist/support/ghosttyThemeCatalog.generated.js.map +1 -0
- package/dist/support/gitStatus.d.ts +21 -0
- package/dist/support/gitStatus.d.ts.map +1 -0
- package/dist/support/gitStatus.js +108 -0
- package/dist/support/gitStatus.js.map +1 -0
- package/dist/support/gitTracker.d.ts +30 -0
- package/dist/support/gitTracker.d.ts.map +1 -0
- package/dist/support/gitTracker.js +143 -0
- package/dist/support/gitTracker.js.map +1 -0
- package/dist/support/index.d.ts +12 -0
- package/dist/support/index.d.ts.map +1 -0
- package/dist/support/index.js +12 -0
- package/dist/support/index.js.map +1 -0
- package/dist/support/planner.d.ts +64 -0
- package/dist/support/planner.d.ts.map +1 -0
- package/dist/support/planner.js +396 -0
- package/dist/support/planner.js.map +1 -0
- package/dist/support/projectMapper.d.ts +46 -0
- package/dist/support/projectMapper.d.ts.map +1 -0
- package/dist/support/projectMapper.js +273 -0
- package/dist/support/projectMapper.js.map +1 -0
- package/dist/support/pty-helper.py +117 -0
- package/dist/support/quotaTracker.d.ts +29 -0
- package/dist/support/quotaTracker.d.ts.map +1 -0
- package/dist/support/quotaTracker.js +89 -0
- package/dist/support/quotaTracker.js.map +1 -0
- package/dist/support/rateLimiter.d.ts +101 -0
- package/dist/support/rateLimiter.d.ts.map +1 -0
- package/dist/support/rateLimiter.js +219 -0
- package/dist/support/rateLimiter.js.map +1 -0
- package/dist/support/rollback.d.ts +61 -0
- package/dist/support/rollback.d.ts.map +1 -0
- package/dist/support/rollback.js +329 -0
- package/dist/support/rollback.js.map +1 -0
- package/dist/support/sharedShell.d.ts +17 -0
- package/dist/support/sharedShell.d.ts.map +1 -0
- package/dist/support/sharedShell.js +439 -0
- package/dist/support/sharedShell.js.map +1 -0
- package/dist/support/stuckDetector.d.ts +68 -0
- package/dist/support/stuckDetector.d.ts.map +1 -0
- package/dist/support/stuckDetector.js +174 -0
- package/dist/support/stuckDetector.js.map +1 -0
- package/dist/support/terminalBridge.d.ts +18 -0
- package/dist/support/terminalBridge.d.ts.map +1 -0
- package/dist/support/terminalBridge.js +553 -0
- package/dist/support/terminalBridge.js.map +1 -0
- package/dist/support/timeWindow.d.ts +60 -0
- package/dist/support/timeWindow.d.ts.map +1 -0
- package/dist/support/timeWindow.js +236 -0
- package/dist/support/timeWindow.js.map +1 -0
- package/dist/support/uiThemes.d.ts +44 -0
- package/dist/support/uiThemes.d.ts.map +1 -0
- package/dist/support/uiThemes.js +290 -0
- package/dist/support/uiThemes.js.map +1 -0
- package/dist/support/web.d.ts +29 -0
- package/dist/support/web.d.ts.map +1 -0
- package/dist/support/web.js +1097 -0
- package/dist/support/web.js.map +1 -0
- package/dist/support/worktreeManager.d.ts +20 -0
- package/dist/support/worktreeManager.d.ts.map +1 -0
- package/dist/support/worktreeManager.js +140 -0
- package/dist/support/worktreeManager.js.map +1 -0
- package/dist/task_state_model.py +55 -0
- package/dist/workItemState/store.d.ts +122 -0
- package/dist/workItemState/store.d.ts.map +1 -0
- package/dist/workItemState/store.js +438 -0
- package/dist/workItemState/store.js.map +1 -0
- package/dist/workItems/azdoBridge.d.ts +42 -0
- package/dist/workItems/azdoBridge.d.ts.map +1 -0
- package/dist/workItems/azdoBridge.js +143 -0
- package/dist/workItems/azdoBridge.js.map +1 -0
- package/dist/workItems/azdoSyncRuntime.d.ts +28 -0
- package/dist/workItems/azdoSyncRuntime.d.ts.map +1 -0
- package/dist/workItems/azdoSyncRuntime.js +158 -0
- package/dist/workItems/azdoSyncRuntime.js.map +1 -0
- package/dist/workItems/azureDevOpsSync.d.ts +128 -0
- package/dist/workItems/azureDevOpsSync.d.ts.map +1 -0
- package/dist/workItems/azureDevOpsSync.js +748 -0
- package/dist/workItems/azureDevOpsSync.js.map +1 -0
- package/dist/workItems/helpers.d.ts +11 -0
- package/dist/workItems/helpers.d.ts.map +1 -0
- package/dist/workItems/helpers.js +17 -0
- package/dist/workItems/helpers.js.map +1 -0
- package/dist/workItems/index.d.ts +21 -0
- package/dist/workItems/index.d.ts.map +1 -0
- package/dist/workItems/index.js +89 -0
- package/dist/workItems/index.js.map +1 -0
- package/dist/workItems/localWorkItemFetcher.d.ts +55 -0
- package/dist/workItems/localWorkItemFetcher.d.ts.map +1 -0
- package/dist/workItems/localWorkItemFetcher.js +209 -0
- package/dist/workItems/localWorkItemFetcher.js.map +1 -0
- package/dist/workItems/migrations/001_rename_workItem_to_work_item.sql +10 -0
- package/dist/workItems/postgresStore.d.ts +78 -0
- package/dist/workItems/postgresStore.d.ts.map +1 -0
- package/dist/workItems/postgresStore.js +937 -0
- package/dist/workItems/postgresStore.js.map +1 -0
- package/dist/workItems/schema.d.ts +257 -0
- package/dist/workItems/schema.d.ts.map +1 -0
- package/dist/workItems/schema.js +176 -0
- package/dist/workItems/schema.js.map +1 -0
- package/dist/workItems/sqliteStore.d.ts +124 -0
- package/dist/workItems/sqliteStore.d.ts.map +1 -0
- package/dist/workItems/sqliteStore.js +713 -0
- package/dist/workItems/sqliteStore.js.map +1 -0
- package/dist/workItems/workItemBoardHtml.d.ts +5 -0
- package/dist/workItems/workItemBoardHtml.d.ts.map +1 -0
- package/dist/workItems/workItemBoardHtml.js +2192 -0
- package/dist/workItems/workItemBoardHtml.js.map +1 -0
- package/package.json +99 -0
- package/templates/AGENTS.md +432 -0
- package/templates/BOOT.md +25 -0
- package/templates/BOOTSTRAP.md +50 -0
- package/templates/CHANGELOG_AUDIT.md +74 -0
- package/templates/HEARTBEAT.md +86 -0
- package/templates/IDENTITY.md +27 -0
- package/templates/PR_LAND.md +75 -0
- package/templates/PR_REVIEW.md +97 -0
- package/templates/SOUL.dev.md +52 -0
- package/templates/SOUL.md +81 -0
- package/templates/TOOLS.md +52 -0
- package/templates/USER.md +22 -0
- package/templates/WORKITEM_ANALYSIS.md +31 -0
- package/templates/agents/executor.md +26 -0
- package/templates/agents/plan.md +22 -0
- package/templates/agents/ralph.md +37 -0
- package/templates/agents/review.md +22 -0
- package/templates/agents/team.md +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
# Enact Factory
|
|
2
|
+
|
|
3
|
+
> Autonomous AI agent orchestrator — Claude, Codex, Cursor-family CLIs, and the Responses API. Part of the [Enact OS](../) product line; replaced OMX-era surfaces with `enact-factory` naming so the pipeline is a Executor/Reviewer/Tester/Documenter assembly line, not a factory.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Enact Factory orchestrates multiple AI agents as autonomous code executors. It picks up workItems (from Azdo, GitHub, or a local workItem directory), runs Executor/Reviewer pair pipelines, reports to Discord, and retains long-term memory via LanceDB. Today the HTTP provider seam is the **Responses API**; CLI-backed agent surfaces remain the reference for full agent behavior until the Responses loop contract in [docs/a_proposed/RESPONSES_AGENT_LOOP_SEMANTICS.md](./docs/a_proposed/RESPONSES_AGENT_LOOP_SEMANTICS.md) is implemented end to end.
|
|
8
|
+
|
|
9
|
+
### Vocabulary
|
|
10
|
+
|
|
11
|
+
Three nouns keep the system's concepts distinct. New readers should learn these before anything else:
|
|
12
|
+
|
|
13
|
+
| Noun | Meaning | Cardinality | Persistence |
|
|
14
|
+
|------|---------|-------------|-------------|
|
|
15
|
+
| **Operator** | The lane driving a WorkItem's lifecycle | One per WorkItem | Durable on WorkItem (`operatorLane` field) |
|
|
16
|
+
| **Stage** | What the LLM is currently doing inside the operator | One per active turn | Transient (per-iteration) |
|
|
17
|
+
| **Project** | A sibling repo being orchestrated | N per Factory deployment | Config-defined |
|
|
18
|
+
|
|
19
|
+
**Operator lanes** (allowlisted values for `operatorLane`):
|
|
20
|
+
- `manual` — operator explicitly opted out of automation
|
|
21
|
+
- `none` — no operator assigned
|
|
22
|
+
- `autopilot` — operator lane with durable state, phases, transitions, resume, and stop-policy parity
|
|
23
|
+
- `ralph` — generic loop operator (durable state, stop policy)
|
|
24
|
+
- `ultrawork` — WorkItem-aware loop operator (durable state, stop policy)
|
|
25
|
+
- `team` — collective operator (durable state, started via `factory_team_init`)
|
|
26
|
+
|
|
27
|
+
**Pipeline stages** (values in `autonomous.defaultStages`):
|
|
28
|
+
- `coder` — LLM generates code (was `executor` in config; the packaged skill named `executor` stays unchanged)
|
|
29
|
+
- `critic` — LLM reviews code (was `reviewer` in config; the packaged skill named `reviewer` stays unchanged)
|
|
30
|
+
- `tester`, `documenter`, `auditor`, `stage-documenter` — remaining pipeline stages (was `skill-documenter`)
|
|
31
|
+
|
|
32
|
+
> **Important:** `pipeline`, `swarm`, `ultrapilot`, `executor`, and `reviewer` are NOT operator lane values. `executor` and `reviewer` are pipeline stages (and packaged skill names), not lanes.
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
This repo is internal-only (no npm publish). Build from source:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git clone <azure-devops-url>/enact-factory
|
|
40
|
+
cd enact-factory
|
|
41
|
+
npm install
|
|
42
|
+
npm run build
|
|
43
|
+
node dist/cli.js
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
That's it. `enact-factory` with no arguments launches the TUI chat interface immediately.
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
### TUI keyboard shortcuts
|
|
51
|
+
|
|
52
|
+
| Key | Action |
|
|
53
|
+
|-----|--------|
|
|
54
|
+
| `Tab` | Switch tabs (Chat / Projects / Tasks / Stuck / Logs) |
|
|
55
|
+
| `Enter` | Send message |
|
|
56
|
+
| `Shift+Enter` | Newline |
|
|
57
|
+
| `i` | Focus input |
|
|
58
|
+
| `Esc` | Exit input focus |
|
|
59
|
+
| `Ctrl+C` | Quit |
|
|
60
|
+
|
|
61
|
+
Status bar shows: provider · model · message count · cumulative cost
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## CLI Commands
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
enact-factory # TUI chat (default)
|
|
69
|
+
enact-factory chat [session] # Simple readline chat
|
|
70
|
+
enact-factory dash # Open dashboard only (UI + AzDO sync, no autonomous runner)
|
|
71
|
+
enact-factory start # Start full daemon (reads the root config.toml)
|
|
72
|
+
enact-factory run "Fix the bug" -p ~/my-project # Run a single task
|
|
73
|
+
enact-factory exec "Run tests" --local --pipeline # Execute via daemon
|
|
74
|
+
enact-factory init # Generate config.toml scaffold
|
|
75
|
+
enact-factory validate # Validate the active config.toml
|
|
76
|
+
|
|
77
|
+
# Code Registry & BS Detector
|
|
78
|
+
enact-factory check --scan # Scan repo → register all entities
|
|
79
|
+
enact-factory check src/foo.ts # File brief (entities, tests, risk)
|
|
80
|
+
enact-factory check --bs # BS pattern scan (bad code smells)
|
|
81
|
+
enact-factory check --stats # Registry statistics
|
|
82
|
+
enact-factory check --high-risk # High-risk entities
|
|
83
|
+
enact-factory check --search "name" # Full-text search
|
|
84
|
+
enact-factory annotate "funcName" --deprecate "reason"
|
|
85
|
+
enact-factory annotate "funcName" --tag "needs-refactor"
|
|
86
|
+
enact-factory annotate "funcName" --warn "error/security: SQL injection"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Enact Factory surface
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
enact-factory setup # Prompts project vs ~/.enact, then installs layout + Factory docs only
|
|
93
|
+
enact-factory setup --scope project # Skip prompt; install to <repo>/.enact/
|
|
94
|
+
enact-factory setup --no-ask # Skip prompt; use saved delivery scope
|
|
95
|
+
enact-factory doctor # Read readiness + ownership checks
|
|
96
|
+
enact-factory hud # Render text HUD from .enact/factory state
|
|
97
|
+
enact-factory task list # List mirrored Factory tasks
|
|
98
|
+
enact-factory session status # Show current Factory session
|
|
99
|
+
enact-factory team init # Initialize tmux/mock team state
|
|
100
|
+
enact-factory team status # Inspect team + tmux readiness
|
|
101
|
+
enact-factory plugins status # Inspect plugin marketplace/install state
|
|
102
|
+
enact-factory plugins list # List repo-local plugin scaffolds under <root>/extensions
|
|
103
|
+
enact-factory agents install # Install Factory AGENTS.md template into a target repo
|
|
104
|
+
enact-factory audit provider-boundary # Check memory/knowledge/provider narrowing
|
|
105
|
+
enact-factory uninstall # Remove Factory-owned Codex-facing setup
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The Factory runtime assets ship from this repo, while host plugin delivery is owned by `enact-extensions`:
|
|
109
|
+
|
|
110
|
+
- Install host surfaces with `enact-extensions install enact-factory --platform <surface>` or `--platform all`.
|
|
111
|
+
- The canonical host plugin bundle lives in `/Users/tarunrana/Documents/Repos/enact-extensions/extensions/enact-factory`.
|
|
112
|
+
- `.agents/plugins/marketplace.json` provides the local marketplace surface.
|
|
113
|
+
- Provider-boundary and replacement-readiness are enforced by the in-repo audit and doctor surfaces.
|
|
114
|
+
|
|
115
|
+
### `enact-factory exec` options
|
|
116
|
+
|
|
117
|
+
| Option | Description |
|
|
118
|
+
|--------|-------------|
|
|
119
|
+
| `--path <path>` | Project path (default: cwd) |
|
|
120
|
+
| `--timeout <seconds>` | Timeout in seconds (default: 600) |
|
|
121
|
+
| `--local` | Execute locally without daemon |
|
|
122
|
+
| `--pipeline` | Full pipeline: executor + reviewer + tester + documenter |
|
|
123
|
+
| `--executor-only` | Executor only, no review |
|
|
124
|
+
| `-m, --model <model>` | Model override for executor |
|
|
125
|
+
|
|
126
|
+
Exit codes: `0` success · `1` failure · `2` timeout
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Full Daemon Setup
|
|
131
|
+
|
|
132
|
+
For autonomous operation (Azdo workItem processing, Discord control, PR auto-improvement), you need a full config:
|
|
133
|
+
|
|
134
|
+
### Prerequisites
|
|
135
|
+
|
|
136
|
+
- **Node.js** >= 22
|
|
137
|
+
- **Claude Code CLI** authenticated (`claude -p`) — default provider
|
|
138
|
+
- **OpenAI Codex CLI** (`codex exec`) — optional alternative provider
|
|
139
|
+
- **Discord Bot** token with message content intent
|
|
140
|
+
- **Azdo** API key and team ID
|
|
141
|
+
- **GitHub CLI** (`gh`) for CI monitoring (optional)
|
|
142
|
+
|
|
143
|
+
### Configuration
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
git clone https://github.com/unohee/Enact-Factory.git
|
|
147
|
+
cd Enact-Factory
|
|
148
|
+
npm install
|
|
149
|
+
edit ../config.toml
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Create a `.env` file:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
DISCORD_TOKEN=your-discord-bot-token
|
|
156
|
+
DISCORD_CHANNEL_ID=your-channel-id
|
|
157
|
+
|
|
158
|
+
# AzDo — all four required for live WorkItem round-tripping
|
|
159
|
+
AZDO_ORG=your-azdo-org
|
|
160
|
+
AZDO_PROJECT=your-azdo-project
|
|
161
|
+
AZDO_PAT=your-azdo-personal-access-token
|
|
162
|
+
AZDO_TEAM_ID=your-azdo-team-id
|
|
163
|
+
# AZDO_API_KEY is a legacy alias for AZDO_PAT (some surfaces still read it)
|
|
164
|
+
AZDO_API_KEY=${AZDO_PAT}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The root `config.toml` supports `${VAR}` / `${VAR:-default}` substitution and is validated with Zod schemas.
|
|
168
|
+
|
|
169
|
+
### Pre-flight checklist (before first live run)
|
|
170
|
+
|
|
171
|
+
Run these in order. Each step has a clear failure mode if skipped.
|
|
172
|
+
|
|
173
|
+
1. **Build the dist tree.** Factory runtime and MCP surfaces read compiled JS from `dist/`. On a fresh clone before build, governance behavior is incomplete.
|
|
174
|
+
```bash
|
|
175
|
+
pnpm build
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
2. **Postgres reachable.** WorkItem store backend is postgres per the root `config.toml` (default `localhost:45432`, db `enact_factory_dev`, user/pw `enact:enact`). The daemon won't start without it.
|
|
179
|
+
```bash
|
|
180
|
+
pg_isready -h localhost -p 45432
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
3. **AzDo env vars present.** All four are required for the sync service and the manual drain MCP tool. Missing vars throw a clear error.
|
|
184
|
+
```bash
|
|
185
|
+
grep -E '^AZDO_(ORG|PROJECT|PAT|TEAM_ID)=' .env
|
|
186
|
+
# expect 4 lines
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
4. **Tests green.** Sanity check the bridge before pointing it at production AzDo.
|
|
190
|
+
```bash
|
|
191
|
+
pnpm test
|
|
192
|
+
# expect: Tests <N> passed | 6 skipped, 0 failed
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
5. **Operator installed.** Enact Operator owns hooks, operator skills, and Codex-facing lifecycle behavior.
|
|
196
|
+
```bash
|
|
197
|
+
enact-operator doctor
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### What you should see end-to-end
|
|
201
|
+
|
|
202
|
+
| Action | Expected flow |
|
|
203
|
+
|---|---|
|
|
204
|
+
| Create WorkItem in AzDo | Next `syncOnce` tick → local store gets it → visible via `factory_workItem_get` |
|
|
205
|
+
| Set `operatorLane=ralph` in AzDo | Sync detects → observe queue entry → `factory_workitem_observe` proposes `factory_skill_activate skill=ralph workItemId=...` |
|
|
206
|
+
| Start Ralph linked to the WorkItem | `factory_ralph_start workItemId=...` stamps the link (rejects second link to different ID — call `factory_ralph_unlink_workitem` first) |
|
|
207
|
+
| Advance Ralph `running → verifying` | Push queue gets `{ implementationComplete: true }` entry → drainer pushes to AzDo on next sync tick → AzDo workItem shows the checkbox |
|
|
208
|
+
| Reviewer approves (lane-local WorkItem) | `recordTeamReview` flips to `completed` + push `reviewPassed: true` → drainer pushes to AzDo |
|
|
209
|
+
| Reviewer approves (cross-repo Epic) | `canAutoClose` guard fires → deferred ledger entry → status stays `review` → operator must call `factory_workitem_acknowledge_close { workItemId, operatorOverrideReason }` to record manual close |
|
|
210
|
+
| Try to stop with pending gates | Operator stop policy denies, writes a verdict, and the next session-start surfaces the warning |
|
|
211
|
+
| Manually drain pending lifecycle pushes | `factory_workitem_drain_push_queue` MCP tool — returns `{ drained, errors[] }`. Requires `AZDO_ORG`/`AZDO_PROJECT`/`AZDO_PAT`/`AZDO_TEAM_ID`. |
|
|
212
|
+
|
|
213
|
+
### Common failure modes
|
|
214
|
+
|
|
215
|
+
| Symptom | Likely cause | Fix |
|
|
216
|
+
|---|---|---|
|
|
217
|
+
| Sessions exit without the expected operator guardrails | Operator hooks are not installed or the runtime is stale | Reinstall/refresh Enact Operator and rebuild the runtime |
|
|
218
|
+
| AzDo workItem checkboxes never flip | Drainer can't reach AzDo | Check env vars + AzDo connectivity; `factory_workitem_drain_push_queue` for diagnostics |
|
|
219
|
+
| `Ultrawork already linked to "X"` error | Trying to retarget a primary parent | Call `factory_ultrawork_unlink_workitem` first (intentional invariant) |
|
|
220
|
+
| Cross-repo Epic stuck at `status: review` after reviewer approval | `canAutoClose` guard fired (correct) | Call `factory_workitem_acknowledge_close` with a reason |
|
|
221
|
+
| §I4 closure-evidence-missing blocker fires repeatedly | Cross-repo Epic closed without acknowledgment | Either call `factory_workitem_acknowledge_close`, or use `factory_stop_acknowledge` for the session |
|
|
222
|
+
|
|
223
|
+
### Key configuration sections
|
|
224
|
+
|
|
225
|
+
| Section | Description |
|
|
226
|
+
|---------|-------------|
|
|
227
|
+
| `discord` | Bot token, channel ID, webhook URL |
|
|
228
|
+
| `azdo` | API key, team ID |
|
|
229
|
+
| `github` | Repos list for CI monitoring |
|
|
230
|
+
| `projects` | Project definitions (name, projectPath, heartbeat interval) |
|
|
231
|
+
| `autonomous` | Schedule, pair mode, stage models, decomposition settings |
|
|
232
|
+
|
|
233
|
+
### CLI Adapter (Provider)
|
|
234
|
+
|
|
235
|
+
```yaml
|
|
236
|
+
adapter: claude # "claude" | "codex" | "responses" | "cursor" | "hermes" | "opencode"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Switch at runtime via Discord: `!provider codex` / `!provider claude`
|
|
240
|
+
|
|
241
|
+
| Adapter | Backend | Models | Auth |
|
|
242
|
+
|---------|---------|--------|------|
|
|
243
|
+
| `claude` | Claude Code CLI | sonnet-4, haiku-4.5, opus-4 | CLI auth |
|
|
244
|
+
| `codex` | OpenAI Codex CLI | o3, o4-mini | CLI auth |
|
|
245
|
+
| `responses` | `/v1/responses` server | auto, gpt-4.1, gpt-4o, gpt-5, o3, o4-mini | Bearer env |
|
|
246
|
+
The Responses adapter can be configured with `ENACT_GATEWAY_BASE_URL` / `ENACT_GATEWAY_API_KEY`, or provider-specific `ENACT_RESPONSES_*` overrides.
|
|
247
|
+
|
|
248
|
+
Per-stage adapter overrides:
|
|
249
|
+
|
|
250
|
+
```yaml
|
|
251
|
+
autonomous:
|
|
252
|
+
defaultStages:
|
|
253
|
+
coder:
|
|
254
|
+
adapter: codex
|
|
255
|
+
model: o4-mini
|
|
256
|
+
critic:
|
|
257
|
+
adapter: claude
|
|
258
|
+
model: claude-sonnet-4-20250514
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Pipeline Stages
|
|
262
|
+
|
|
263
|
+
```yaml
|
|
264
|
+
autonomous:
|
|
265
|
+
defaultStages:
|
|
266
|
+
coder:
|
|
267
|
+
model: claude-haiku-4-5-20251001
|
|
268
|
+
escalateModel: claude-sonnet-4-20250514
|
|
269
|
+
escalateAfterIteration: 3
|
|
270
|
+
timeoutMs: 1800000
|
|
271
|
+
critic:
|
|
272
|
+
model: claude-haiku-4-5-20251001
|
|
273
|
+
timeoutMs: 600000
|
|
274
|
+
tester:
|
|
275
|
+
enabled: false
|
|
276
|
+
documenter:
|
|
277
|
+
enabled: false
|
|
278
|
+
auditor:
|
|
279
|
+
enabled: false
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Running the daemon
|
|
283
|
+
|
|
284
|
+
#### macOS launchd service (recommended)
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
npm run service:install # Build and install as system service
|
|
288
|
+
npm run service:start # Start
|
|
289
|
+
npm run service:stop # Stop
|
|
290
|
+
npm run service:restart # Restart
|
|
291
|
+
npm run service:status # Status and recent logs
|
|
292
|
+
npm run service:logs # stdout (follow mode)
|
|
293
|
+
npm run service:errors # stderr (follow mode)
|
|
294
|
+
npm run service:uninstall # Uninstall
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
#### Manual
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
npm run build && npm start # Production
|
|
301
|
+
npm run dev # Development (tsx watch)
|
|
302
|
+
docker compose up -d # Docker
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Architecture
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
┌──────────────────────────┐
|
|
311
|
+
│ Azdo API │
|
|
312
|
+
│ (workItems, state, memory) │
|
|
313
|
+
└─────────────┬────────────┘
|
|
314
|
+
│
|
|
315
|
+
┌─────────────────────┼─────────────────────┐
|
|
316
|
+
│ │ │
|
|
317
|
+
v v v
|
|
318
|
+
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
319
|
+
│ AutonomousRunner │ │ DecisionEngine │ │ TaskScheduler │
|
|
320
|
+
│ (heartbeat loop) │─>│ (scope guard) │─>│ (queue + slots) │
|
|
321
|
+
└────────┬─────────┘ └──────────────────┘ └────────┬─────────┘
|
|
322
|
+
│ │
|
|
323
|
+
v v
|
|
324
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
325
|
+
│ PairPipeline │
|
|
326
|
+
│ ┌────────┐ ┌──────────┐ ┌────────┐ ┌─────────────┐ │
|
|
327
|
+
│ │ Executor │──>│ Reviewer │──>│ Tester │──>│ Documenter │ │
|
|
328
|
+
│ │(Adapter│<──│(Adapter) │ │(Adapter│ │ (Adapter) │ │
|
|
329
|
+
│ └───┬────┘ └──────────┘ └────────┘ └─────────────┘ │
|
|
330
|
+
│ │ ↕ StuckDetector │
|
|
331
|
+
│ ┌───┴────────────────────────────────────────────────────┐ │
|
|
332
|
+
│ │ Adapters: Claude | Codex | Responses | Cursor | Hermes | Opencode │ │
|
|
333
|
+
│ └────────────────────────────────────────────────────────┘ │
|
|
334
|
+
└──────────────────────────────────────────────────────────────┘
|
|
335
|
+
│ │ │
|
|
336
|
+
v v v
|
|
337
|
+
┌──────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
338
|
+
│ Discord Bot │ │ Memory (LanceDB │ │ Knowledge Graph │
|
|
339
|
+
│ (commands) │ │ + Xenova E5) │ │ (code analysis) │
|
|
340
|
+
└──────────────┘ └──────────────────┘ └────────┬─────────┘
|
|
341
|
+
│
|
|
342
|
+
┌────────┴─────────┐
|
|
343
|
+
│ Code Registry │
|
|
344
|
+
│ (SQLite + FTS5) │
|
|
345
|
+
│ + BS Detector │
|
|
346
|
+
└──────────────────┘
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## Features
|
|
350
|
+
|
|
351
|
+
- **Multi-Provider Adapters** — Pluggable adapter system: **Claude Code**, **Codex**, **Responses API**, **Cursor**, **Hermes**, and **Opencode**
|
|
352
|
+
- **Code Registry** — SQLite-backed entity registry tracking every function/class/type across 8 languages, with complexity scoring, test mapping, and risk assessment
|
|
353
|
+
- **WorkItem Store** — PostgreSQL-backed work-item persistence and Kanban UI, with SQLite kept only as a legacy fallback path
|
|
354
|
+
- **BS Detector** — Built-in static analysis engine that detects bad code patterns (empty catch, hardcoded secrets, `as any`, etc.) with pipeline guard integration
|
|
355
|
+
- **Autonomous Pipeline** — Cron-driven heartbeat fetches Azdo workItems, runs Executor/Reviewer pair loops, and updates workItem state automatically
|
|
356
|
+
- **Executor/Reviewer Pairs** — Multi-iteration code generation with automated review, testing, and documentation stages
|
|
357
|
+
- **Decision Engine** — Scope validation, rate limiting, priority-based task selection, and workflow mapping
|
|
358
|
+
- **Cognitive Memory** — LanceDB vector store with Xenova/multilingual-e5-base embeddings for long-term recall across sessions
|
|
359
|
+
- **Knowledge Graph** — Static code analysis, dependency mapping, impact analysis, and file-level conflict detection across concurrent tasks
|
|
360
|
+
- **Discord Control** — Full command interface for monitoring, task dispatch, scheduling, provider switching, and pair session management
|
|
361
|
+
- **Rich TUI Chat** — Claude Code inspired terminal interface with tabs, streaming responses, and geek-themed loading messages
|
|
362
|
+
- **Dynamic Scheduling** — Cron-based job scheduler with Discord management commands
|
|
363
|
+
- **PR Auto-Improvement** — Monitors open PRs, auto-fixes CI failures, auto-resolves merge conflicts, and retries until all checks pass
|
|
364
|
+
- **Long-Running Monitors** — Track external processes (training jobs, batch tasks) and report completion
|
|
365
|
+
- **Web Dashboard** — Real-time pipeline stages, cost tracking, worktree status, and live logs on port 3847
|
|
366
|
+
- **Pace Control** — 5-hour rolling window task caps, per-project limits, turbo mode, exponential backoff on failures
|
|
367
|
+
- **i18n** — English and Korean locale support
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## How It Works
|
|
372
|
+
|
|
373
|
+
```
|
|
374
|
+
Azdo (Todo/In Progress)
|
|
375
|
+
→ Fetch assigned workItems
|
|
376
|
+
→ DecisionEngine filters & prioritizes
|
|
377
|
+
→ Resolve project path via projectMapper
|
|
378
|
+
→ PairPipeline.run()
|
|
379
|
+
→ Executor generates code (Claude CLI)
|
|
380
|
+
→ Reviewer evaluates (APPROVE/REVISE/REJECT)
|
|
381
|
+
→ Loop up to N iterations
|
|
382
|
+
→ Optional: Tester → Documenter stages
|
|
383
|
+
→ Update Azdo workItem state (Done/Blocked)
|
|
384
|
+
→ Report to Discord
|
|
385
|
+
→ Save to cognitive memory
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Memory System
|
|
389
|
+
|
|
390
|
+
Hybrid retrieval: `0.55 × similarity + 0.20 × importance + 0.15 × recency + 0.10 × frequency`
|
|
391
|
+
|
|
392
|
+
Memory types: `belief` · `strategy` · `user_model` · `system_pattern` · `constraint`
|
|
393
|
+
|
|
394
|
+
Background: decay, consolidation, contradiction detection, distillation.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Discord Commands
|
|
399
|
+
|
|
400
|
+
### Task Dispatch
|
|
401
|
+
| Command | Description |
|
|
402
|
+
|---------|-------------|
|
|
403
|
+
| `!dev <repo> "<task>"` | Run a dev task on a repository |
|
|
404
|
+
| `!dev list` | List known repositories |
|
|
405
|
+
| `!tasks` | List running tasks |
|
|
406
|
+
| `!cancel <taskId>` | Cancel a running task |
|
|
407
|
+
|
|
408
|
+
### Agent Management
|
|
409
|
+
| Command | Description |
|
|
410
|
+
|---------|-------------|
|
|
411
|
+
| `!status` | Agent and system status |
|
|
412
|
+
| `!pause <session>` | Pause autonomous work |
|
|
413
|
+
| `!resume <session>` | Resume autonomous work |
|
|
414
|
+
| `!log <session> [lines]` | View recent output |
|
|
415
|
+
|
|
416
|
+
### Azdo Integration
|
|
417
|
+
| Command | Description |
|
|
418
|
+
|---------|-------------|
|
|
419
|
+
| `!workItems` | List Azdo workItems |
|
|
420
|
+
| `!workItem <id>` | View workItem details |
|
|
421
|
+
| `!limits` | Agent daily execution limits |
|
|
422
|
+
|
|
423
|
+
### Autonomous Execution
|
|
424
|
+
| Command | Description |
|
|
425
|
+
|---------|-------------|
|
|
426
|
+
| `!auto` | Execution status |
|
|
427
|
+
| `!auto start [cron] [--pair]` | Start autonomous mode |
|
|
428
|
+
| `!auto stop` | Stop autonomous mode |
|
|
429
|
+
| `!auto run` | Trigger immediate heartbeat |
|
|
430
|
+
| `!approve` / `!reject` | Approve or reject pending task |
|
|
431
|
+
|
|
432
|
+
### Executor/Reviewer Pair
|
|
433
|
+
| Command | Description |
|
|
434
|
+
|---------|-------------|
|
|
435
|
+
| `!pair` | Pair session status |
|
|
436
|
+
| `!pair start [taskId]` | Start a pair session |
|
|
437
|
+
| `!pair run <taskId> [project]` | Direct pair run |
|
|
438
|
+
| `!pair stop [sessionId]` | Stop a pair session |
|
|
439
|
+
| `!pair history [n]` | View session history |
|
|
440
|
+
| `!pair stats` | View pair statistics |
|
|
441
|
+
|
|
442
|
+
### Scheduling
|
|
443
|
+
| Command | Description |
|
|
444
|
+
|---------|-------------|
|
|
445
|
+
| `!schedule` | List all schedules |
|
|
446
|
+
| `!schedule run <name>` | Run a schedule immediately |
|
|
447
|
+
| `!schedule toggle <name>` | Enable/disable a schedule |
|
|
448
|
+
| `!schedule add <name> <path> <interval> "<prompt>"` | Add a schedule |
|
|
449
|
+
| `!schedule remove <name>` | Remove a schedule |
|
|
450
|
+
|
|
451
|
+
### Other
|
|
452
|
+
| Command | Description |
|
|
453
|
+
|---------|-------------|
|
|
454
|
+
| `!ci` | GitHub CI failure status |
|
|
455
|
+
| `!provider <claude\|codex>` | Switch CLI provider at runtime |
|
|
456
|
+
| `!codex` | Recent session records |
|
|
457
|
+
| `!memory search "<query>"` | Search cognitive memory |
|
|
458
|
+
| `!help` | Full command reference |
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
## Project Structure
|
|
463
|
+
|
|
464
|
+
```
|
|
465
|
+
src/
|
|
466
|
+
├── index.ts # Entry point
|
|
467
|
+
├── cli.ts # CLI entry point (run, exec, chat, init, validate, start)
|
|
468
|
+
├── cli/ # CLI subcommand handlers
|
|
469
|
+
│ └── promptHandler.ts # exec command: daemon submit, auto-start, polling
|
|
470
|
+
├── core/ # Config, service lifecycle, types, event hub
|
|
471
|
+
├── adapters/ # CLI/provider adapters (claude, codex, responses), process registry
|
|
472
|
+
├── agents/ # Executor, reviewer, tester, documenter, auditor
|
|
473
|
+
│ ├── pairPipeline.ts # Executor → Reviewer → Tester → Documenter pipeline
|
|
474
|
+
│ ├── agentBus.ts # Inter-agent message bus
|
|
475
|
+
│ └── cliStreamParser.ts # Claude CLI output parser
|
|
476
|
+
├── orchestration/ # Decision engine, task parser, scheduler, workflow
|
|
477
|
+
├── automation/ # Autonomous runner, cron scheduler, PR processor
|
|
478
|
+
├── memory/ # LanceDB + Xenova embeddings cognitive memory
|
|
479
|
+
├── knowledge/ # Code knowledge graph (scanner, analyzer, graph)
|
|
480
|
+
├── registry/ # Code entity registry, BS detector, entity scanner
|
|
481
|
+
├── workItems/ # Postgres-first workItem tracker (GraphQL + Kanban UI)
|
|
482
|
+
├── discord/ # Bot core, command handlers, pair session UI
|
|
483
|
+
├── azdo/ # Azdo SDK wrapper, project updater
|
|
484
|
+
├── github/ # GitHub CLI wrapper for CI monitoring
|
|
485
|
+
├── support/ # Web dashboard, planner, rollback, git tools
|
|
486
|
+
├── locale/ # i18n (en/ko) with prompt templates
|
|
487
|
+
└── __tests__/ # Vitest test suite
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
## State & Data
|
|
491
|
+
|
|
492
|
+
| Path | Description |
|
|
493
|
+
|------|-------------|
|
|
494
|
+
| `.enact/factory/` | Repo-local Factory state directory (cache, logs, memory, plans, reports, research, sessions, state, team, ultragoal) |
|
|
495
|
+
| `.enact/factory/state/registry.db` | Code entity registry (SQLite) |
|
|
496
|
+
| `.enact/factory/state/workItems.db` | PostgreSQL workItem store (root `config.toml`; legacy SQLite fallback only if explicitly configured) |
|
|
497
|
+
| `~/.claude/enact-factory-*.json` | Pipeline history and task state |
|
|
498
|
+
| `../config.toml` | Canonical workspace configuration |
|
|
499
|
+
| `dist/` | Compiled output |
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
## Tech Stack
|
|
505
|
+
|
|
506
|
+
| Category | Technology |
|
|
507
|
+
|----------|-----------|
|
|
508
|
+
| Runtime | Node.js 22+ (ESM) |
|
|
509
|
+
| Language | TypeScript (strict mode) |
|
|
510
|
+
| Build | tsc |
|
|
511
|
+
| Agent Execution | Claude Code, Codex, Responses API, Cursor, Hermes, Opencode |
|
|
512
|
+
| WorkItem Store | PostgreSQL (default) |
|
|
513
|
+
| Code Registry DB | better-sqlite3 (WAL mode, FTS5) |
|
|
514
|
+
| Task Management | Azdo SDK (`@azdo/sdk`) |
|
|
515
|
+
| Communication | Discord.js 14 |
|
|
516
|
+
| Vector DB | LanceDB + Apache Arrow |
|
|
517
|
+
| Embeddings | Xenova/transformers (multilingual-e5-base, 768D) |
|
|
518
|
+
| Scheduling | Croner |
|
|
519
|
+
| Config | YAML + Zod validation |
|
|
520
|
+
| Linting | oxlint |
|
|
521
|
+
| Testing | Vitest |
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Changelog
|
|
526
|
+
|
|
527
|
+
### v0.3.0
|
|
528
|
+
- **Code Registry**: `enact-factory check --scan` scans repo, registers 1000+ entities across 8 languages (TS, Python, Go, Rust, Java, C, C++, C#) with test mapping, complexity scoring, and risk assessment
|
|
529
|
+
- **BS Detector**: `enact-factory check --bs` — built-in static analysis for bad code patterns, pipeline guard integration
|
|
530
|
+
- **Responses Adapter**: Gateway-backed `/v1/responses` execution with env-based bearer auth
|
|
531
|
+
- **Responses Status**: Transport works today, but full agent parity is deferred until the loop semantics in `docs/a_proposed/RESPONSES_AGENT_LOOP_SEMANTICS.md` land
|
|
532
|
+
- **WorkItem Tracker**: PostgreSQL + GraphQL + Kanban web UI at `:3847/workItems`
|
|
533
|
+
- **CLI**: `enact-factory check`, `enact-factory annotate` commands
|
|
534
|
+
|
|
535
|
+
### v0.2.2
|
|
536
|
+
- `enact-factory` without arguments now launches TUI chat directly
|
|
537
|
+
|
|
538
|
+
### v0.2.1
|
|
539
|
+
- Security: patched lodash, picomatch, rollup, undici, yaml vulnerabilities
|
|
540
|
+
|
|
541
|
+
### v0.2.0
|
|
542
|
+
- Multi-project orchestration via Azdo ticket routing
|
|
543
|
+
- Standalone driver module extracted for reuse
|
|
544
|
+
- Autonomous runner hardening and multi-project orchestration
|
|
545
|
+
- Task-state rehydration from Azdo comments
|
|
546
|
+
- `--verbose` flag for detailed execution logging
|
|
547
|
+
- Codex adapter: dropped o-series model override
|
|
548
|
+
|
|
549
|
+
### v0.1.0
|
|
550
|
+
- Initial release
|
|
551
|
+
- Executor/Reviewer pair pipeline
|
|
552
|
+
- Claude Code CLI, Codex, Cursor-family adapters, and a Responses API seam
|
|
553
|
+
- Discord bot control
|
|
554
|
+
- Azdo integration
|
|
555
|
+
- LanceDB cognitive memory
|
|
556
|
+
- Web dashboard (port 3847)
|
|
557
|
+
- Rich TUI chat interface
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
## License
|
|
562
|
+
|
|
563
|
+
This project is licensed under the proprietary **Agent Development License (ADL)**.
|
|
564
|
+
See [LICENSE](LICENSE) for full terms.
|
|
565
|
+
|
|
566
|
+
© Enact Factory. All rights reserved.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ToolDefinition } from '../adapters/tools.js';
|
|
2
|
+
import type { CliRunResult } from '../adapters/types.js';
|
|
3
|
+
/** OpenAI Chat Completions API 메시지 포맷 */
|
|
4
|
+
export type ChatMessage = {
|
|
5
|
+
role: 'system';
|
|
6
|
+
content: string;
|
|
7
|
+
} | {
|
|
8
|
+
role: 'user';
|
|
9
|
+
content: string;
|
|
10
|
+
} | {
|
|
11
|
+
role: 'assistant';
|
|
12
|
+
content: string | null;
|
|
13
|
+
tool_calls?: ApiToolCall[];
|
|
14
|
+
} | {
|
|
15
|
+
role: 'tool';
|
|
16
|
+
tool_call_id: string;
|
|
17
|
+
content: string;
|
|
18
|
+
};
|
|
19
|
+
interface ApiToolCall {
|
|
20
|
+
id: string;
|
|
21
|
+
type: 'function';
|
|
22
|
+
function: {
|
|
23
|
+
name: string;
|
|
24
|
+
arguments: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
interface ChatCompletionResponse {
|
|
28
|
+
choices: Array<{
|
|
29
|
+
message: {
|
|
30
|
+
role: string;
|
|
31
|
+
content: string | null;
|
|
32
|
+
tool_calls?: ApiToolCall[];
|
|
33
|
+
};
|
|
34
|
+
finish_reason: string;
|
|
35
|
+
}>;
|
|
36
|
+
usage?: {
|
|
37
|
+
prompt_tokens: number;
|
|
38
|
+
completion_tokens: number;
|
|
39
|
+
total_tokens: number;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** 에이전틱 루프 설정 */
|
|
43
|
+
export interface AgenticLoopOptions {
|
|
44
|
+
/** 시스템 프롬프트 */
|
|
45
|
+
systemPrompt?: string;
|
|
46
|
+
/** 사용자 프롬프트 (작업 지시) */
|
|
47
|
+
prompt: string;
|
|
48
|
+
/** 프로젝트 작업 디렉토리 (도구 실행 cwd) */
|
|
49
|
+
cwd: string;
|
|
50
|
+
/** 모델명 */
|
|
51
|
+
model: string;
|
|
52
|
+
/** API 호출 함수 (어댑터별로 주입) */
|
|
53
|
+
callApi: (messages: ChatMessage[], tools: ToolDefinition[]) => Promise<ChatCompletionResponse>;
|
|
54
|
+
/** 최대 도구 사용 턴 수 (기본: 15) */
|
|
55
|
+
maxTurns?: number;
|
|
56
|
+
/** 전체 타임아웃 (ms, 기본: 300000) */
|
|
57
|
+
timeoutMs?: number;
|
|
58
|
+
/** 실시간 로그 콜백 */
|
|
59
|
+
onLog?: (line: string) => void;
|
|
60
|
+
/** 도구 사용 허용 여부 (기본: true) */
|
|
61
|
+
enableTools?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** 루프 실행 결과 */
|
|
64
|
+
export interface AgenticLoopResult {
|
|
65
|
+
/** 최종 텍스트 응답 */
|
|
66
|
+
text: string;
|
|
67
|
+
/** 사용한 도구 호출 횟수 */
|
|
68
|
+
toolCallCount: number;
|
|
69
|
+
/** 총 API 호출 횟수 */
|
|
70
|
+
apiCallCount: number;
|
|
71
|
+
/** 총 토큰 사용량 (추적 가능한 경우) */
|
|
72
|
+
totalTokens: number;
|
|
73
|
+
/** 소요 시간 (ms) */
|
|
74
|
+
durationMs: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 에이전틱 도구 루프 실행
|
|
78
|
+
*
|
|
79
|
+
* 흐름:
|
|
80
|
+
* 1. 프롬프트로 API 호출 (도구 정의 포함)
|
|
81
|
+
* 2. 응답에 tool_calls가 있으면 → 도구 실행 → 결과를 메시지에 추가 → 2로
|
|
82
|
+
* 3. 응답에 tool_calls가 없으면 (finish_reason = 'stop') → 최종 텍스트 반환
|
|
83
|
+
*/
|
|
84
|
+
export declare function runAgenticLoop(options: AgenticLoopOptions): Promise<AgenticLoopResult>;
|
|
85
|
+
/**
|
|
86
|
+
* AgenticLoopResult → CliRunResult 변환
|
|
87
|
+
*/
|
|
88
|
+
export declare function loopResultToCliResult(result: AgenticLoopResult): CliRunResult;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=agenticLoop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agenticLoop.d.ts","sourceRoot":"","sources":["../../src/adapters/agenticLoop.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,yCAAyC;AACzC,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,CAAC;QACb,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;YACvB,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;SAC5B,CAAC;QACF,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC,CAAC;IACH,KAAK,CAAC,EAAE;QACN,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,iBAAiB;AACjB,MAAM,WAAW,kBAAkB;IACjC,eAAe;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU;IACV,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/F,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAe;AACf,MAAM,WAAW,iBAAiB;IAChC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0H5F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,YAAY,CAO7E"}
|