@shepai/cli 1.8.2 → 1.9.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/src/application/ports/output/agent-executor-factory.interface.d.ts +45 -0
- package/dist/src/application/ports/output/agent-executor-factory.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agent-executor-factory.interface.js +19 -0
- package/dist/src/application/ports/output/agent-executor.interface.d.ts +117 -0
- package/dist/src/application/ports/output/agent-executor.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agent-executor.interface.js +23 -0
- package/dist/src/application/ports/output/agent-registry.interface.d.ts +91 -0
- package/dist/src/application/ports/output/agent-registry.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agent-registry.interface.js +33 -0
- package/dist/src/application/ports/output/agent-run-repository.interface.d.ts +70 -0
- package/dist/src/application/ports/output/agent-run-repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agent-run-repository.interface.js +11 -0
- package/dist/src/application/ports/output/agent-runner.interface.d.ts +82 -0
- package/dist/src/application/ports/output/agent-runner.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agent-runner.interface.js +23 -0
- package/dist/src/application/ports/output/index.d.ts +5 -0
- package/dist/src/application/ports/output/index.d.ts.map +1 -1
- package/dist/src/application/use-cases/agents/run-agent.use-case.d.ts +52 -0
- package/dist/src/application/use-cases/agents/run-agent.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/run-agent.use-case.js +77 -0
- package/dist/src/domain/generated/output.d.ts +98 -0
- package/dist/src/domain/generated/output.d.ts.map +1 -1
- package/dist/src/domain/generated/output.js +17 -0
- package/dist/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/src/infrastructure/di/container.js +39 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts +51 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts.map +1 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.js +64 -0
- package/dist/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/migrations.js +27 -0
- package/dist/src/infrastructure/repositories/agent-run.repository.d.ts +25 -0
- package/dist/src/infrastructure/repositories/agent-run.repository.d.ts.map +1 -0
- package/dist/src/infrastructure/repositories/agent-run.repository.js +119 -0
- package/dist/src/infrastructure/services/agents/agent-executor-factory.service.d.ts +43 -0
- package/dist/src/infrastructure/services/agents/agent-executor-factory.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/agent-executor-factory.service.js +58 -0
- package/dist/src/infrastructure/services/agents/agent-registry.service.d.ts +18 -0
- package/dist/src/infrastructure/services/agents/agent-registry.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/agent-registry.service.js +30 -0
- package/dist/src/infrastructure/services/agents/agent-runner.service.d.ts +27 -0
- package/dist/src/infrastructure/services/agents/agent-runner.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/agent-runner.service.js +117 -0
- package/dist/src/infrastructure/services/agents/executors/claude-code-executor.service.d.ts +37 -0
- package/dist/src/infrastructure/services/agents/executors/claude-code-executor.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/executors/claude-code-executor.service.js +275 -0
- package/dist/src/infrastructure/services/agents/langgraph/analyze-repository-graph.d.ts +119 -0
- package/dist/src/infrastructure/services/agents/langgraph/analyze-repository-graph.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/langgraph/analyze-repository-graph.js +56 -0
- package/dist/src/infrastructure/services/agents/langgraph/checkpointer.d.ts +9 -0
- package/dist/src/infrastructure/services/agents/langgraph/checkpointer.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/langgraph/checkpointer.js +10 -0
- package/dist/src/infrastructure/services/agents/langgraph/prompts/analyze-repository.prompt.d.ts +3 -0
- package/dist/src/infrastructure/services/agents/langgraph/prompts/analyze-repository.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/langgraph/prompts/analyze-repository.prompt.js +18 -0
- package/dist/src/infrastructure/services/agents/streaming/event-channel.d.ts +39 -0
- package/dist/src/infrastructure/services/agents/streaming/event-channel.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/streaming/event-channel.js +64 -0
- package/dist/src/infrastructure/services/agents/streaming/index.d.ts +9 -0
- package/dist/src/infrastructure/services/agents/streaming/index.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/streaming/index.js +8 -0
- package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.d.ts +25 -0
- package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.js +51 -0
- package/dist/src/presentation/cli/commands/run.command.d.ts +19 -0
- package/dist/src/presentation/cli/commands/run.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/run.command.js +130 -0
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/cli/ui/messages.d.ts +1 -1
- package/dist/src/presentation/cli/ui/messages.d.ts.map +1 -1
- package/dist/src/presentation/cli/ui/messages.js +9 -3
- package/dist/src/presentation/cli/ui/symbols.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +1 -1
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +1 -1
- package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/_ccea5183._.js +1 -1
- package/web/.next/server/pages/404.html +2 -2
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- /package/web/.next/static/{grFKAJxfDM8ro--FQzN2H → -QL3Wkz2EyCtR0S30gd0p}/_buildManifest.js +0 -0
- /package/web/.next/static/{grFKAJxfDM8ro--FQzN2H → -QL3Wkz2EyCtR0S30gd0p}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{grFKAJxfDM8ro--FQzN2H → -QL3Wkz2EyCtR0S30gd0p}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run Agent Use Case
|
|
3
|
+
*
|
|
4
|
+
* Executes a named agent workflow by resolving it from the registry
|
|
5
|
+
* and delegating to the agent runner.
|
|
6
|
+
*
|
|
7
|
+
* Business Rules:
|
|
8
|
+
* - Agent must be registered in the registry before running
|
|
9
|
+
* - Error messages include available agent names for discoverability
|
|
10
|
+
* - Options are passed through to the runner as-is
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
+
};
|
|
21
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
22
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23
|
+
};
|
|
24
|
+
import { injectable, inject } from 'tsyringe';
|
|
25
|
+
/**
|
|
26
|
+
* Use case for running a named agent workflow.
|
|
27
|
+
*
|
|
28
|
+
* Algorithm:
|
|
29
|
+
* 1. Validate agent exists in the registry
|
|
30
|
+
* 2. Delegate to agent runner with name, prompt, and options
|
|
31
|
+
* 3. Return the resulting AgentRun record
|
|
32
|
+
*/
|
|
33
|
+
let RunAgentUseCase = class RunAgentUseCase {
|
|
34
|
+
agentRunner;
|
|
35
|
+
agentRegistry;
|
|
36
|
+
constructor(agentRunner, agentRegistry) {
|
|
37
|
+
this.agentRunner = agentRunner;
|
|
38
|
+
this.agentRegistry = agentRegistry;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Execute the run agent use case.
|
|
42
|
+
*
|
|
43
|
+
* @param input - Agent run input including name, prompt, and options
|
|
44
|
+
* @returns AgentRun record tracking the execution
|
|
45
|
+
* @throws Error if the agent name is not registered
|
|
46
|
+
*/
|
|
47
|
+
async execute(input) {
|
|
48
|
+
const definition = this.agentRegistry.get(input.agentName);
|
|
49
|
+
if (!definition) {
|
|
50
|
+
const available = this.agentRegistry.list().map((a) => a.name);
|
|
51
|
+
throw new Error(`Unknown agent: "${input.agentName}". Available agents: ${available.join(', ') || 'none'}`);
|
|
52
|
+
}
|
|
53
|
+
return this.agentRunner.runAgent(input.agentName, input.prompt, input.options);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Execute the run agent use case with streaming events.
|
|
57
|
+
*
|
|
58
|
+
* @param input - Agent run input including name, prompt, and options
|
|
59
|
+
* @returns An async iterable of agent run events
|
|
60
|
+
* @throws Error if the agent name is not registered
|
|
61
|
+
*/
|
|
62
|
+
async *executeStream(input) {
|
|
63
|
+
const definition = this.agentRegistry.get(input.agentName);
|
|
64
|
+
if (!definition) {
|
|
65
|
+
const available = this.agentRegistry.list().map((a) => a.name);
|
|
66
|
+
throw new Error(`Unknown agent: "${input.agentName}". Available agents: ${available.join(', ') || 'none'}`);
|
|
67
|
+
}
|
|
68
|
+
yield* this.agentRunner.runAgentStream(input.agentName, input.prompt, input.options);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
RunAgentUseCase = __decorate([
|
|
72
|
+
injectable(),
|
|
73
|
+
__param(0, inject('IAgentRunner')),
|
|
74
|
+
__param(1, inject('IAgentRegistry')),
|
|
75
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
76
|
+
], RunAgentUseCase);
|
|
77
|
+
export { RunAgentUseCase };
|
|
@@ -729,6 +729,104 @@ export type Deployment = {
|
|
|
729
729
|
*/
|
|
730
730
|
stoppedAt?: any;
|
|
731
731
|
};
|
|
732
|
+
export declare enum AgentRunStatus {
|
|
733
|
+
pending = "pending",
|
|
734
|
+
running = "running",
|
|
735
|
+
completed = "completed",
|
|
736
|
+
failed = "failed",
|
|
737
|
+
interrupted = "interrupted",
|
|
738
|
+
cancelled = "cancelled"
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Agent execution run record
|
|
742
|
+
*/
|
|
743
|
+
export type AgentRun = BaseEntity & {
|
|
744
|
+
/**
|
|
745
|
+
* Agent executor type used (claude-code, gemini-cli, etc.)
|
|
746
|
+
*/
|
|
747
|
+
agentType: AgentType;
|
|
748
|
+
/**
|
|
749
|
+
* Agent workflow name (analyze-repository, requirements, etc.)
|
|
750
|
+
*/
|
|
751
|
+
agentName: string;
|
|
752
|
+
/**
|
|
753
|
+
* Current execution status
|
|
754
|
+
*/
|
|
755
|
+
status: AgentRunStatus;
|
|
756
|
+
/**
|
|
757
|
+
* Input prompt sent to agent executor
|
|
758
|
+
*/
|
|
759
|
+
prompt: string;
|
|
760
|
+
/**
|
|
761
|
+
* Final result output (optional, populated on completion)
|
|
762
|
+
*/
|
|
763
|
+
result?: string;
|
|
764
|
+
/**
|
|
765
|
+
* Executor session ID for resumption (optional)
|
|
766
|
+
*/
|
|
767
|
+
sessionId?: string;
|
|
768
|
+
/**
|
|
769
|
+
* LangGraph thread_id for checkpoint lookup and crash resume
|
|
770
|
+
*/
|
|
771
|
+
threadId: string;
|
|
772
|
+
/**
|
|
773
|
+
* Process ID for crash recovery (optional)
|
|
774
|
+
*/
|
|
775
|
+
pid?: number;
|
|
776
|
+
/**
|
|
777
|
+
* Last heartbeat timestamp for crash detection (optional)
|
|
778
|
+
*/
|
|
779
|
+
lastHeartbeat?: any;
|
|
780
|
+
/**
|
|
781
|
+
* Execution start timestamp (optional)
|
|
782
|
+
*/
|
|
783
|
+
startedAt?: any;
|
|
784
|
+
/**
|
|
785
|
+
* Execution completion timestamp (optional)
|
|
786
|
+
*/
|
|
787
|
+
completedAt?: any;
|
|
788
|
+
/**
|
|
789
|
+
* Error message if execution failed (optional)
|
|
790
|
+
*/
|
|
791
|
+
error?: string;
|
|
792
|
+
};
|
|
793
|
+
/**
|
|
794
|
+
* Streaming event emitted during agent execution
|
|
795
|
+
*/
|
|
796
|
+
export type AgentRunEvent = {
|
|
797
|
+
/**
|
|
798
|
+
* Event type: progress, result, or error
|
|
799
|
+
*/
|
|
800
|
+
type: 'progress' | 'result' | 'error';
|
|
801
|
+
/**
|
|
802
|
+
* Event content
|
|
803
|
+
*/
|
|
804
|
+
content: string;
|
|
805
|
+
/**
|
|
806
|
+
* Event timestamp
|
|
807
|
+
*/
|
|
808
|
+
timestamp: any;
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* Agent workflow registration metadata
|
|
812
|
+
*/
|
|
813
|
+
export type AgentDefinition = {
|
|
814
|
+
/**
|
|
815
|
+
* Unique agent workflow name (e.g., analyze-repository)
|
|
816
|
+
*/
|
|
817
|
+
name: string;
|
|
818
|
+
/**
|
|
819
|
+
* Human-readable description of what this agent does
|
|
820
|
+
*/
|
|
821
|
+
description: string;
|
|
822
|
+
};
|
|
823
|
+
export declare enum AgentFeature {
|
|
824
|
+
sessionResume = "session-resume",
|
|
825
|
+
streaming = "streaming",
|
|
826
|
+
toolScoping = "tool-scoping",
|
|
827
|
+
structuredOutput = "structured-output",
|
|
828
|
+
systemPrompt = "system-prompt"
|
|
829
|
+
}
|
|
732
830
|
export type DeployTarget = DeployTargetActionItem | DeployTargetTask | DeployTargetTasks;
|
|
733
831
|
export type Askable = {
|
|
734
832
|
Ask(request: AskRequest): AskResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/domain/generated/output.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;IACT;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB;;OAE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IAAI,OAAO,CAAC;IAC5B,kBAAkB,IAAI,WAAW,EAAE,CAAC;IACpC,UAAU,IAAI,QAAQ,CAAC;IACvB,UAAU,IAAI,IAAI,CAAC;IACnB,mBAAmB,IAAI,IAAI,CAAC;IAC5B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,GAAG,UAAU,CAAC;IAC7D,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC;IAC7C,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;CACjC,CAAC"}
|
|
@@ -104,3 +104,20 @@ export var DeploymentState;
|
|
|
104
104
|
DeploymentState["Ready"] = "Ready";
|
|
105
105
|
DeploymentState["Stopped"] = "Stopped";
|
|
106
106
|
})(DeploymentState || (DeploymentState = {}));
|
|
107
|
+
export var AgentRunStatus;
|
|
108
|
+
(function (AgentRunStatus) {
|
|
109
|
+
AgentRunStatus["pending"] = "pending";
|
|
110
|
+
AgentRunStatus["running"] = "running";
|
|
111
|
+
AgentRunStatus["completed"] = "completed";
|
|
112
|
+
AgentRunStatus["failed"] = "failed";
|
|
113
|
+
AgentRunStatus["interrupted"] = "interrupted";
|
|
114
|
+
AgentRunStatus["cancelled"] = "cancelled";
|
|
115
|
+
})(AgentRunStatus || (AgentRunStatus = {}));
|
|
116
|
+
export var AgentFeature;
|
|
117
|
+
(function (AgentFeature) {
|
|
118
|
+
AgentFeature["sessionResume"] = "session-resume";
|
|
119
|
+
AgentFeature["streaming"] = "streaming";
|
|
120
|
+
AgentFeature["toolScoping"] = "tool-scoping";
|
|
121
|
+
AgentFeature["structuredOutput"] = "structured-output";
|
|
122
|
+
AgentFeature["systemPrompt"] = "system-prompt";
|
|
123
|
+
})(AgentFeature || (AgentFeature = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA4CrC;;;;;GAKG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CA0ErE;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -18,12 +18,19 @@ import { promisify } from 'node:util';
|
|
|
18
18
|
import { execFile } from 'node:child_process';
|
|
19
19
|
import { VersionService } from '../services/version.service.js';
|
|
20
20
|
import { WebServerService } from '../services/web-server.service.js';
|
|
21
|
+
import { AgentExecutorFactory } from '../services/agents/agent-executor-factory.service.js';
|
|
22
|
+
import { AgentRegistryService } from '../services/agents/agent-registry.service.js';
|
|
23
|
+
import { AgentRunnerService } from '../services/agents/agent-runner.service.js';
|
|
24
|
+
import { SQLiteAgentRunRepository } from '../repositories/agent-run.repository.js';
|
|
25
|
+
import { createCheckpointer } from '../services/agents/langgraph/checkpointer.js';
|
|
26
|
+
import { spawn } from 'node:child_process';
|
|
21
27
|
// Use cases
|
|
22
28
|
import { InitializeSettingsUseCase } from '../../application/use-cases/settings/initialize-settings.use-case.js';
|
|
23
29
|
import { LoadSettingsUseCase } from '../../application/use-cases/settings/load-settings.use-case.js';
|
|
24
30
|
import { UpdateSettingsUseCase } from '../../application/use-cases/settings/update-settings.use-case.js';
|
|
25
31
|
import { ConfigureAgentUseCase } from '../../application/use-cases/agents/configure-agent.use-case.js';
|
|
26
32
|
import { ValidateAgentAuthUseCase } from '../../application/use-cases/agents/validate-agent-auth.use-case.js';
|
|
33
|
+
import { RunAgentUseCase } from '../../application/use-cases/agents/run-agent.use-case.js';
|
|
27
34
|
// Database connection
|
|
28
35
|
import { getSQLiteConnection } from '../persistence/sqlite/connection.js';
|
|
29
36
|
import { runSQLiteMigrations } from '../persistence/sqlite/migrations.js';
|
|
@@ -56,12 +63,44 @@ export async function initializeContainer() {
|
|
|
56
63
|
container.register('IWebServerService', {
|
|
57
64
|
useFactory: () => new WebServerService(),
|
|
58
65
|
});
|
|
66
|
+
// Register agent infrastructure
|
|
67
|
+
container.register('IAgentRunRepository', {
|
|
68
|
+
useFactory: (c) => {
|
|
69
|
+
const database = c.resolve('Database');
|
|
70
|
+
return new SQLiteAgentRunRepository(database);
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
container.register('IAgentExecutorFactory', {
|
|
74
|
+
useFactory: () => {
|
|
75
|
+
// Wrap spawn to ensure stdio is explicitly set to 'pipe'
|
|
76
|
+
const spawnWithPipe = (command, args, options) => {
|
|
77
|
+
return spawn(command, args, { ...options, stdio: 'pipe' });
|
|
78
|
+
};
|
|
79
|
+
return new AgentExecutorFactory(spawnWithPipe);
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
container.register('IAgentRegistry', {
|
|
83
|
+
useFactory: () => new AgentRegistryService(),
|
|
84
|
+
});
|
|
85
|
+
container.register('Checkpointer', {
|
|
86
|
+
useFactory: () => createCheckpointer(':memory:'),
|
|
87
|
+
});
|
|
88
|
+
container.register('IAgentRunner', {
|
|
89
|
+
useFactory: (c) => {
|
|
90
|
+
const registry = c.resolve('IAgentRegistry');
|
|
91
|
+
const executorFactory = c.resolve('IAgentExecutorFactory');
|
|
92
|
+
const checkpointer = c.resolve('Checkpointer');
|
|
93
|
+
const runRepository = c.resolve('IAgentRunRepository');
|
|
94
|
+
return new AgentRunnerService(registry, executorFactory, checkpointer, runRepository);
|
|
95
|
+
},
|
|
96
|
+
});
|
|
59
97
|
// Register use cases (singletons for performance)
|
|
60
98
|
container.registerSingleton(InitializeSettingsUseCase);
|
|
61
99
|
container.registerSingleton(LoadSettingsUseCase);
|
|
62
100
|
container.registerSingleton(UpdateSettingsUseCase);
|
|
63
101
|
container.registerSingleton(ConfigureAgentUseCase);
|
|
64
102
|
container.registerSingleton(ValidateAgentAuthUseCase);
|
|
103
|
+
container.registerSingleton(RunAgentUseCase);
|
|
65
104
|
return container;
|
|
66
105
|
}
|
|
67
106
|
/**
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Run Database Mapper
|
|
3
|
+
*
|
|
4
|
+
* Maps between AgentRun domain objects and SQLite database rows.
|
|
5
|
+
*
|
|
6
|
+
* Mapping Rules:
|
|
7
|
+
* - TypeScript objects (camelCase) <-> SQL columns (snake_case)
|
|
8
|
+
* - Dates stored as INTEGER (unix milliseconds)
|
|
9
|
+
* - Optional fields stored as NULL when missing
|
|
10
|
+
* - AgentType and AgentRunStatus stored as string values
|
|
11
|
+
*/
|
|
12
|
+
import type { AgentRun } from '../../../../domain/generated/output.js';
|
|
13
|
+
/**
|
|
14
|
+
* Database row type matching the agent_runs table schema.
|
|
15
|
+
* Uses snake_case column names.
|
|
16
|
+
*/
|
|
17
|
+
export interface AgentRunRow {
|
|
18
|
+
id: string;
|
|
19
|
+
agent_type: string;
|
|
20
|
+
agent_name: string;
|
|
21
|
+
status: string;
|
|
22
|
+
prompt: string;
|
|
23
|
+
result: string | null;
|
|
24
|
+
session_id: string | null;
|
|
25
|
+
thread_id: string;
|
|
26
|
+
pid: number | null;
|
|
27
|
+
last_heartbeat: number | null;
|
|
28
|
+
started_at: number | null;
|
|
29
|
+
completed_at: number | null;
|
|
30
|
+
error: string | null;
|
|
31
|
+
created_at: number;
|
|
32
|
+
updated_at: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Maps AgentRun domain object to database row.
|
|
36
|
+
* Converts Date objects to unix milliseconds for SQL storage.
|
|
37
|
+
*
|
|
38
|
+
* @param agentRun - AgentRun domain object
|
|
39
|
+
* @returns Database row object with snake_case columns
|
|
40
|
+
*/
|
|
41
|
+
export declare function toDatabase(agentRun: AgentRun): AgentRunRow;
|
|
42
|
+
/**
|
|
43
|
+
* Maps database row to AgentRun domain object.
|
|
44
|
+
* Converts unix milliseconds back to Date objects.
|
|
45
|
+
* Excludes optional fields that are NULL.
|
|
46
|
+
*
|
|
47
|
+
* @param row - Database row with snake_case columns
|
|
48
|
+
* @returns AgentRun domain object with camelCase properties
|
|
49
|
+
*/
|
|
50
|
+
export declare function fromDatabase(row: AgentRunRow): AgentRun;
|
|
51
|
+
//# sourceMappingURL=agent-run.mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-run.mapper.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAGvE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAqB1D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,QAAQ,CAkBvD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Run Database Mapper
|
|
3
|
+
*
|
|
4
|
+
* Maps between AgentRun domain objects and SQLite database rows.
|
|
5
|
+
*
|
|
6
|
+
* Mapping Rules:
|
|
7
|
+
* - TypeScript objects (camelCase) <-> SQL columns (snake_case)
|
|
8
|
+
* - Dates stored as INTEGER (unix milliseconds)
|
|
9
|
+
* - Optional fields stored as NULL when missing
|
|
10
|
+
* - AgentType and AgentRunStatus stored as string values
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Maps AgentRun domain object to database row.
|
|
14
|
+
* Converts Date objects to unix milliseconds for SQL storage.
|
|
15
|
+
*
|
|
16
|
+
* @param agentRun - AgentRun domain object
|
|
17
|
+
* @returns Database row object with snake_case columns
|
|
18
|
+
*/
|
|
19
|
+
export function toDatabase(agentRun) {
|
|
20
|
+
return {
|
|
21
|
+
id: agentRun.id,
|
|
22
|
+
agent_type: agentRun.agentType,
|
|
23
|
+
agent_name: agentRun.agentName,
|
|
24
|
+
status: agentRun.status,
|
|
25
|
+
prompt: agentRun.prompt,
|
|
26
|
+
result: agentRun.result ?? null,
|
|
27
|
+
session_id: agentRun.sessionId ?? null,
|
|
28
|
+
thread_id: agentRun.threadId,
|
|
29
|
+
pid: agentRun.pid ?? null,
|
|
30
|
+
last_heartbeat: agentRun.lastHeartbeat instanceof Date ? agentRun.lastHeartbeat.getTime() : null,
|
|
31
|
+
started_at: agentRun.startedAt instanceof Date ? agentRun.startedAt.getTime() : null,
|
|
32
|
+
completed_at: agentRun.completedAt instanceof Date ? agentRun.completedAt.getTime() : null,
|
|
33
|
+
error: agentRun.error ?? null,
|
|
34
|
+
created_at: agentRun.createdAt instanceof Date ? agentRun.createdAt.getTime() : agentRun.createdAt,
|
|
35
|
+
updated_at: agentRun.updatedAt instanceof Date ? agentRun.updatedAt.getTime() : agentRun.updatedAt,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Maps database row to AgentRun domain object.
|
|
40
|
+
* Converts unix milliseconds back to Date objects.
|
|
41
|
+
* Excludes optional fields that are NULL.
|
|
42
|
+
*
|
|
43
|
+
* @param row - Database row with snake_case columns
|
|
44
|
+
* @returns AgentRun domain object with camelCase properties
|
|
45
|
+
*/
|
|
46
|
+
export function fromDatabase(row) {
|
|
47
|
+
return {
|
|
48
|
+
id: row.id,
|
|
49
|
+
agentType: row.agent_type,
|
|
50
|
+
agentName: row.agent_name,
|
|
51
|
+
status: row.status,
|
|
52
|
+
prompt: row.prompt,
|
|
53
|
+
threadId: row.thread_id,
|
|
54
|
+
createdAt: new Date(row.created_at),
|
|
55
|
+
updatedAt: new Date(row.updated_at),
|
|
56
|
+
...(row.result !== null && { result: row.result }),
|
|
57
|
+
...(row.session_id !== null && { sessionId: row.session_id }),
|
|
58
|
+
...(row.pid !== null && { pid: row.pid }),
|
|
59
|
+
...(row.last_heartbeat !== null && { lastHeartbeat: new Date(row.last_heartbeat) }),
|
|
60
|
+
...(row.started_at !== null && { startedAt: new Date(row.started_at) }),
|
|
61
|
+
...(row.completed_at !== null && { completedAt: new Date(row.completed_at) }),
|
|
62
|
+
...(row.error !== null && { error: row.error }),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../src/infrastructure/persistence/sqlite/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AA4E3C;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9E"}
|
|
@@ -42,6 +42,33 @@ CREATE UNIQUE INDEX IF NOT EXISTS idx_settings_id ON settings(id);
|
|
|
42
42
|
ALTER TABLE settings ADD COLUMN agent_type TEXT NOT NULL DEFAULT 'claude-code';
|
|
43
43
|
ALTER TABLE settings ADD COLUMN agent_auth_method TEXT NOT NULL DEFAULT 'session';
|
|
44
44
|
ALTER TABLE settings ADD COLUMN agent_token TEXT;
|
|
45
|
+
`,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
version: 3,
|
|
49
|
+
sql: `
|
|
50
|
+
-- Migration 003: Create Agent Runs Table
|
|
51
|
+
CREATE TABLE agent_runs (
|
|
52
|
+
id TEXT PRIMARY KEY,
|
|
53
|
+
agent_type TEXT NOT NULL,
|
|
54
|
+
agent_name TEXT NOT NULL,
|
|
55
|
+
status TEXT NOT NULL,
|
|
56
|
+
prompt TEXT NOT NULL,
|
|
57
|
+
result TEXT,
|
|
58
|
+
session_id TEXT,
|
|
59
|
+
thread_id TEXT NOT NULL,
|
|
60
|
+
pid INTEGER,
|
|
61
|
+
last_heartbeat INTEGER,
|
|
62
|
+
started_at INTEGER,
|
|
63
|
+
completed_at INTEGER,
|
|
64
|
+
error TEXT,
|
|
65
|
+
created_at INTEGER NOT NULL,
|
|
66
|
+
updated_at INTEGER NOT NULL
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
CREATE INDEX idx_agent_runs_status ON agent_runs(status);
|
|
70
|
+
CREATE INDEX idx_agent_runs_pid ON agent_runs(pid) WHERE pid IS NOT NULL;
|
|
71
|
+
CREATE INDEX idx_agent_runs_thread_id ON agent_runs(thread_id);
|
|
45
72
|
`,
|
|
46
73
|
},
|
|
47
74
|
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQLite Agent Run Repository Implementation
|
|
3
|
+
*
|
|
4
|
+
* Implements IAgentRunRepository using SQLite database.
|
|
5
|
+
* Uses prepared statements to prevent SQL injection.
|
|
6
|
+
*/
|
|
7
|
+
import type Database from 'better-sqlite3';
|
|
8
|
+
import type { IAgentRunRepository } from '../../application/ports/output/agent-run-repository.interface.js';
|
|
9
|
+
import type { AgentRun, AgentRunStatus } from '../../domain/generated/output.js';
|
|
10
|
+
/**
|
|
11
|
+
* SQLite implementation of IAgentRunRepository.
|
|
12
|
+
* Manages AgentRun persistence with CRUD operations.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SQLiteAgentRunRepository implements IAgentRunRepository {
|
|
15
|
+
private readonly db;
|
|
16
|
+
constructor(db: Database.Database);
|
|
17
|
+
create(agentRun: AgentRun): Promise<void>;
|
|
18
|
+
findById(id: string): Promise<AgentRun | null>;
|
|
19
|
+
findByThreadId(threadId: string): Promise<AgentRun | null>;
|
|
20
|
+
updateStatus(id: string, status: AgentRunStatus, updates?: Partial<AgentRun>): Promise<void>;
|
|
21
|
+
findRunningByPid(pid: number): Promise<AgentRun[]>;
|
|
22
|
+
list(): Promise<AgentRun[]>;
|
|
23
|
+
delete(id: string): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=agent-run.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-run.repository.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/repositories/agent-run.repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOjF;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBzC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAW9C,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAW1D,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAC1B,OAAO,CAAC,IAAI,CAAC;IAkDV,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAOlD,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAO3B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQLite Agent Run Repository Implementation
|
|
3
|
+
*
|
|
4
|
+
* Implements IAgentRunRepository using SQLite database.
|
|
5
|
+
* Uses prepared statements to prevent SQL injection.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
import { injectable } from 'tsyringe';
|
|
17
|
+
import { toDatabase, fromDatabase, } from '../persistence/sqlite/mappers/agent-run.mapper.js';
|
|
18
|
+
/**
|
|
19
|
+
* SQLite implementation of IAgentRunRepository.
|
|
20
|
+
* Manages AgentRun persistence with CRUD operations.
|
|
21
|
+
*/
|
|
22
|
+
let SQLiteAgentRunRepository = class SQLiteAgentRunRepository {
|
|
23
|
+
db;
|
|
24
|
+
constructor(db) {
|
|
25
|
+
this.db = db;
|
|
26
|
+
}
|
|
27
|
+
async create(agentRun) {
|
|
28
|
+
const row = toDatabase(agentRun);
|
|
29
|
+
const stmt = this.db.prepare(`
|
|
30
|
+
INSERT INTO agent_runs (
|
|
31
|
+
id, agent_type, agent_name, status, prompt, result,
|
|
32
|
+
session_id, thread_id, pid, last_heartbeat,
|
|
33
|
+
started_at, completed_at, error,
|
|
34
|
+
created_at, updated_at
|
|
35
|
+
) VALUES (
|
|
36
|
+
@id, @agent_type, @agent_name, @status, @prompt, @result,
|
|
37
|
+
@session_id, @thread_id, @pid, @last_heartbeat,
|
|
38
|
+
@started_at, @completed_at, @error,
|
|
39
|
+
@created_at, @updated_at
|
|
40
|
+
)
|
|
41
|
+
`);
|
|
42
|
+
stmt.run(row);
|
|
43
|
+
}
|
|
44
|
+
async findById(id) {
|
|
45
|
+
const stmt = this.db.prepare('SELECT * FROM agent_runs WHERE id = ?');
|
|
46
|
+
const row = stmt.get(id);
|
|
47
|
+
if (!row) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return fromDatabase(row);
|
|
51
|
+
}
|
|
52
|
+
async findByThreadId(threadId) {
|
|
53
|
+
const stmt = this.db.prepare('SELECT * FROM agent_runs WHERE thread_id = ?');
|
|
54
|
+
const row = stmt.get(threadId);
|
|
55
|
+
if (!row) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return fromDatabase(row);
|
|
59
|
+
}
|
|
60
|
+
async updateStatus(id, status, updates) {
|
|
61
|
+
const setClauses = ['status = @status', 'updated_at = @updated_at'];
|
|
62
|
+
const params = {
|
|
63
|
+
id,
|
|
64
|
+
status,
|
|
65
|
+
updated_at: updates?.updatedAt instanceof Date ? updates.updatedAt.getTime() : Date.now(),
|
|
66
|
+
};
|
|
67
|
+
if (updates?.result !== undefined) {
|
|
68
|
+
setClauses.push('result = @result');
|
|
69
|
+
params.result = updates.result;
|
|
70
|
+
}
|
|
71
|
+
if (updates?.sessionId !== undefined) {
|
|
72
|
+
setClauses.push('session_id = @session_id');
|
|
73
|
+
params.session_id = updates.sessionId;
|
|
74
|
+
}
|
|
75
|
+
if (updates?.pid !== undefined) {
|
|
76
|
+
setClauses.push('pid = @pid');
|
|
77
|
+
params.pid = updates.pid;
|
|
78
|
+
}
|
|
79
|
+
if (updates?.lastHeartbeat !== undefined) {
|
|
80
|
+
setClauses.push('last_heartbeat = @last_heartbeat');
|
|
81
|
+
params.last_heartbeat =
|
|
82
|
+
updates.lastHeartbeat instanceof Date ? updates.lastHeartbeat.getTime() : null;
|
|
83
|
+
}
|
|
84
|
+
if (updates?.startedAt !== undefined) {
|
|
85
|
+
setClauses.push('started_at = @started_at');
|
|
86
|
+
params.started_at = updates.startedAt instanceof Date ? updates.startedAt.getTime() : null;
|
|
87
|
+
}
|
|
88
|
+
if (updates?.completedAt !== undefined) {
|
|
89
|
+
setClauses.push('completed_at = @completed_at');
|
|
90
|
+
params.completed_at =
|
|
91
|
+
updates.completedAt instanceof Date ? updates.completedAt.getTime() : null;
|
|
92
|
+
}
|
|
93
|
+
if (updates?.error !== undefined) {
|
|
94
|
+
setClauses.push('error = @error');
|
|
95
|
+
params.error = updates.error;
|
|
96
|
+
}
|
|
97
|
+
const stmt = this.db.prepare(`UPDATE agent_runs SET ${setClauses.join(', ')} WHERE id = @id`);
|
|
98
|
+
stmt.run(params);
|
|
99
|
+
}
|
|
100
|
+
async findRunningByPid(pid) {
|
|
101
|
+
const stmt = this.db.prepare('SELECT * FROM agent_runs WHERE pid = ? AND status = ?');
|
|
102
|
+
const rows = stmt.all(pid, 'running');
|
|
103
|
+
return rows.map(fromDatabase);
|
|
104
|
+
}
|
|
105
|
+
async list() {
|
|
106
|
+
const stmt = this.db.prepare('SELECT * FROM agent_runs');
|
|
107
|
+
const rows = stmt.all();
|
|
108
|
+
return rows.map(fromDatabase);
|
|
109
|
+
}
|
|
110
|
+
async delete(id) {
|
|
111
|
+
const stmt = this.db.prepare('DELETE FROM agent_runs WHERE id = ?');
|
|
112
|
+
stmt.run(id);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
SQLiteAgentRunRepository = __decorate([
|
|
116
|
+
injectable(),
|
|
117
|
+
__metadata("design:paramtypes", [Object])
|
|
118
|
+
], SQLiteAgentRunRepository);
|
|
119
|
+
export { SQLiteAgentRunRepository };
|