@gitgov/core 1.11.0 → 1.12.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/index.d.ts +860 -456
- package/dist/src/index.js +366 -21
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -7543,8 +7543,8 @@ var ProjectAdapter = class {
|
|
|
7543
7543
|
/**
|
|
7544
7544
|
* [EARS-2] Validates environment for GitGovernance initialization
|
|
7545
7545
|
*/
|
|
7546
|
-
async validateEnvironment(
|
|
7547
|
-
const targetPath =
|
|
7546
|
+
async validateEnvironment(path12) {
|
|
7547
|
+
const targetPath = path12 || process.env["GITGOV_ORIGINAL_DIR"] || process.cwd();
|
|
7548
7548
|
const warnings = [];
|
|
7549
7549
|
const suggestions = [];
|
|
7550
7550
|
try {
|
|
@@ -9957,22 +9957,22 @@ var LintModule = class {
|
|
|
9957
9957
|
);
|
|
9958
9958
|
}
|
|
9959
9959
|
this.fileSystem = dependencies.fileSystem ?? {
|
|
9960
|
-
readFile: async (
|
|
9961
|
-
return promises.readFile(
|
|
9960
|
+
readFile: async (path12, encoding) => {
|
|
9961
|
+
return promises.readFile(path12, encoding);
|
|
9962
9962
|
},
|
|
9963
|
-
writeFile: async (
|
|
9964
|
-
await promises.writeFile(
|
|
9963
|
+
writeFile: async (path12, content) => {
|
|
9964
|
+
await promises.writeFile(path12, content, "utf-8");
|
|
9965
9965
|
},
|
|
9966
|
-
exists: async (
|
|
9966
|
+
exists: async (path12) => {
|
|
9967
9967
|
try {
|
|
9968
|
-
await promises.access(
|
|
9968
|
+
await promises.access(path12);
|
|
9969
9969
|
return true;
|
|
9970
9970
|
} catch {
|
|
9971
9971
|
return false;
|
|
9972
9972
|
}
|
|
9973
9973
|
},
|
|
9974
|
-
unlink: async (
|
|
9975
|
-
await promises.unlink(
|
|
9974
|
+
unlink: async (path12) => {
|
|
9975
|
+
await promises.unlink(path12);
|
|
9976
9976
|
}
|
|
9977
9977
|
};
|
|
9978
9978
|
}
|
|
@@ -10480,8 +10480,8 @@ var LintModule = class {
|
|
|
10480
10480
|
* This ensures we know the correct type for each record based on its directory.
|
|
10481
10481
|
* @private
|
|
10482
10482
|
*/
|
|
10483
|
-
async discoverAllRecordsWithTypes(
|
|
10484
|
-
const projectRoot2 = ConfigManager.findProjectRoot() ||
|
|
10483
|
+
async discoverAllRecordsWithTypes(path12) {
|
|
10484
|
+
const projectRoot2 = ConfigManager.findProjectRoot() || path12 || ".gitgov/";
|
|
10485
10485
|
const recordTypes = [
|
|
10486
10486
|
"actor",
|
|
10487
10487
|
"agent",
|
|
@@ -14053,10 +14053,10 @@ var RelationshipAnalyzer = class {
|
|
|
14053
14053
|
}
|
|
14054
14054
|
const visited = /* @__PURE__ */ new Set();
|
|
14055
14055
|
const recursionStack = /* @__PURE__ */ new Set();
|
|
14056
|
-
const
|
|
14056
|
+
const path12 = [];
|
|
14057
14057
|
for (const node of graph.keys()) {
|
|
14058
14058
|
if (!visited.has(node)) {
|
|
14059
|
-
const cyclePath = this.findCycleDFS(node, graph, visited, recursionStack,
|
|
14059
|
+
const cyclePath = this.findCycleDFS(node, graph, visited, recursionStack, path12);
|
|
14060
14060
|
if (cyclePath.length > 0) {
|
|
14061
14061
|
const cycleDescription = this.formatCycleError(cyclePath);
|
|
14062
14062
|
throw new CircularDependencyError(cycleDescription);
|
|
@@ -14067,24 +14067,24 @@ var RelationshipAnalyzer = class {
|
|
|
14067
14067
|
/**
|
|
14068
14068
|
* DFS helper for circular dependency detection with path tracking
|
|
14069
14069
|
*/
|
|
14070
|
-
findCycleDFS(node, graph, visited, recursionStack,
|
|
14070
|
+
findCycleDFS(node, graph, visited, recursionStack, path12) {
|
|
14071
14071
|
visited.add(node);
|
|
14072
14072
|
recursionStack.add(node);
|
|
14073
|
-
|
|
14073
|
+
path12.push(node);
|
|
14074
14074
|
const neighbors = graph.get(node) || [];
|
|
14075
14075
|
for (const neighbor of neighbors) {
|
|
14076
14076
|
if (!visited.has(neighbor)) {
|
|
14077
|
-
const cyclePath = this.findCycleDFS(neighbor, graph, visited, recursionStack,
|
|
14077
|
+
const cyclePath = this.findCycleDFS(neighbor, graph, visited, recursionStack, path12);
|
|
14078
14078
|
if (cyclePath.length > 0) {
|
|
14079
14079
|
return cyclePath;
|
|
14080
14080
|
}
|
|
14081
14081
|
} else if (recursionStack.has(neighbor)) {
|
|
14082
|
-
const cycleStartIndex =
|
|
14083
|
-
return
|
|
14082
|
+
const cycleStartIndex = path12.indexOf(neighbor);
|
|
14083
|
+
return path12.slice(cycleStartIndex).concat([neighbor]);
|
|
14084
14084
|
}
|
|
14085
14085
|
}
|
|
14086
14086
|
recursionStack.delete(node);
|
|
14087
|
-
|
|
14087
|
+
path12.pop();
|
|
14088
14088
|
return [];
|
|
14089
14089
|
}
|
|
14090
14090
|
/**
|
|
@@ -15618,6 +15618,351 @@ var WaiverWriter = class {
|
|
|
15618
15618
|
}
|
|
15619
15619
|
};
|
|
15620
15620
|
|
|
15621
|
-
|
|
15621
|
+
// src/runner/index.ts
|
|
15622
|
+
var runner_exports = {};
|
|
15623
|
+
__export(runner_exports, {
|
|
15624
|
+
AgentNotFoundError: () => AgentNotFoundError,
|
|
15625
|
+
AgentRunnerModule: () => AgentRunnerModule,
|
|
15626
|
+
EngineConfigError: () => EngineConfigError,
|
|
15627
|
+
FunctionNotExportedError: () => FunctionNotExportedError,
|
|
15628
|
+
LocalBackend: () => LocalBackend,
|
|
15629
|
+
LocalEngineConfigError: () => LocalEngineConfigError,
|
|
15630
|
+
MissingDependencyError: () => MissingDependencyError,
|
|
15631
|
+
RunnerError: () => RunnerError,
|
|
15632
|
+
RuntimeNotFoundError: () => RuntimeNotFoundError,
|
|
15633
|
+
UnsupportedEngineTypeError: () => UnsupportedEngineTypeError
|
|
15634
|
+
});
|
|
15635
|
+
|
|
15636
|
+
// src/runner/errors.ts
|
|
15637
|
+
var RunnerError = class _RunnerError extends Error {
|
|
15638
|
+
constructor(message) {
|
|
15639
|
+
super(message);
|
|
15640
|
+
this.name = "RunnerError";
|
|
15641
|
+
Object.setPrototypeOf(this, _RunnerError.prototype);
|
|
15642
|
+
}
|
|
15643
|
+
};
|
|
15644
|
+
var AgentNotFoundError = class _AgentNotFoundError extends RunnerError {
|
|
15645
|
+
agentId;
|
|
15646
|
+
constructor(agentId) {
|
|
15647
|
+
super(`AgentNotFound: ${agentId}`);
|
|
15648
|
+
this.name = "AgentNotFoundError";
|
|
15649
|
+
this.agentId = agentId;
|
|
15650
|
+
Object.setPrototypeOf(this, _AgentNotFoundError.prototype);
|
|
15651
|
+
}
|
|
15652
|
+
};
|
|
15653
|
+
var FunctionNotExportedError = class _FunctionNotExportedError extends RunnerError {
|
|
15654
|
+
functionName;
|
|
15655
|
+
entrypoint;
|
|
15656
|
+
constructor(functionName, entrypoint) {
|
|
15657
|
+
super(`FunctionNotExported: ${functionName} not found in ${entrypoint}`);
|
|
15658
|
+
this.name = "FunctionNotExportedError";
|
|
15659
|
+
this.functionName = functionName;
|
|
15660
|
+
this.entrypoint = entrypoint;
|
|
15661
|
+
Object.setPrototypeOf(this, _FunctionNotExportedError.prototype);
|
|
15662
|
+
}
|
|
15663
|
+
};
|
|
15664
|
+
var LocalEngineConfigError = class _LocalEngineConfigError extends RunnerError {
|
|
15665
|
+
constructor() {
|
|
15666
|
+
super("LocalEngineConfigError: entrypoint or runtime required for execution");
|
|
15667
|
+
this.name = "LocalEngineConfigError";
|
|
15668
|
+
Object.setPrototypeOf(this, _LocalEngineConfigError.prototype);
|
|
15669
|
+
}
|
|
15670
|
+
};
|
|
15671
|
+
var UnsupportedEngineTypeError = class _UnsupportedEngineTypeError extends RunnerError {
|
|
15672
|
+
engineType;
|
|
15673
|
+
constructor(engineType) {
|
|
15674
|
+
super(`UnsupportedEngineType: ${engineType}`);
|
|
15675
|
+
this.name = "UnsupportedEngineTypeError";
|
|
15676
|
+
this.engineType = engineType;
|
|
15677
|
+
Object.setPrototypeOf(this, _UnsupportedEngineTypeError.prototype);
|
|
15678
|
+
}
|
|
15679
|
+
};
|
|
15680
|
+
var EngineConfigError = class _EngineConfigError extends RunnerError {
|
|
15681
|
+
engineType;
|
|
15682
|
+
missingField;
|
|
15683
|
+
constructor(engineType, missingField) {
|
|
15684
|
+
super(`EngineConfigError: ${missingField} required for ${engineType}`);
|
|
15685
|
+
this.name = "EngineConfigError";
|
|
15686
|
+
this.engineType = engineType;
|
|
15687
|
+
this.missingField = missingField;
|
|
15688
|
+
Object.setPrototypeOf(this, _EngineConfigError.prototype);
|
|
15689
|
+
}
|
|
15690
|
+
};
|
|
15691
|
+
var MissingDependencyError = class _MissingDependencyError extends RunnerError {
|
|
15692
|
+
dependency;
|
|
15693
|
+
reason;
|
|
15694
|
+
constructor(dependency, reason) {
|
|
15695
|
+
super(`MissingDependency: ${dependency} ${reason}`);
|
|
15696
|
+
this.name = "MissingDependencyError";
|
|
15697
|
+
this.dependency = dependency;
|
|
15698
|
+
this.reason = reason;
|
|
15699
|
+
Object.setPrototypeOf(this, _MissingDependencyError.prototype);
|
|
15700
|
+
}
|
|
15701
|
+
};
|
|
15702
|
+
var RuntimeNotFoundError = class _RuntimeNotFoundError extends RunnerError {
|
|
15703
|
+
runtime;
|
|
15704
|
+
constructor(runtime) {
|
|
15705
|
+
super(`RuntimeNotFound: ${runtime}`);
|
|
15706
|
+
this.name = "RuntimeNotFoundError";
|
|
15707
|
+
this.runtime = runtime;
|
|
15708
|
+
Object.setPrototypeOf(this, _RuntimeNotFoundError.prototype);
|
|
15709
|
+
}
|
|
15710
|
+
};
|
|
15711
|
+
|
|
15712
|
+
// src/runner/backends/local_backend.ts
|
|
15713
|
+
var LocalBackend = class {
|
|
15714
|
+
constructor(projectRoot2, runtimeRegistry) {
|
|
15715
|
+
this.projectRoot = projectRoot2;
|
|
15716
|
+
this.runtimeRegistry = runtimeRegistry;
|
|
15717
|
+
}
|
|
15718
|
+
/**
|
|
15719
|
+
* Executes a local agent and captures its output.
|
|
15720
|
+
*/
|
|
15721
|
+
async execute(engine, ctx) {
|
|
15722
|
+
if (!engine.entrypoint && !engine.runtime) {
|
|
15723
|
+
throw new LocalEngineConfigError();
|
|
15724
|
+
}
|
|
15725
|
+
if (engine.runtime) {
|
|
15726
|
+
return this.executeRuntime(engine, ctx);
|
|
15727
|
+
}
|
|
15728
|
+
return this.executeEntrypoint(engine, ctx);
|
|
15729
|
+
}
|
|
15730
|
+
/**
|
|
15731
|
+
* Executes via entrypoint (dynamic import) and captures output.
|
|
15732
|
+
*/
|
|
15733
|
+
async executeEntrypoint(engine, ctx) {
|
|
15734
|
+
const absolutePath = path6__default.join(this.projectRoot, engine.entrypoint);
|
|
15735
|
+
const mod = await import(absolutePath);
|
|
15736
|
+
const fnName = engine.function || "runAgent";
|
|
15737
|
+
const fn = mod[fnName];
|
|
15738
|
+
if (typeof fn !== "function") {
|
|
15739
|
+
throw new FunctionNotExportedError(fnName, engine.entrypoint);
|
|
15740
|
+
}
|
|
15741
|
+
const result = await fn(ctx);
|
|
15742
|
+
return this.normalizeOutput(result);
|
|
15743
|
+
}
|
|
15744
|
+
/**
|
|
15745
|
+
* Executes via runtime handler.
|
|
15746
|
+
*/
|
|
15747
|
+
async executeRuntime(engine, ctx) {
|
|
15748
|
+
if (!this.runtimeRegistry) {
|
|
15749
|
+
throw new RuntimeNotFoundError(engine.runtime);
|
|
15750
|
+
}
|
|
15751
|
+
const handler = this.runtimeRegistry.get(engine.runtime);
|
|
15752
|
+
if (!handler) {
|
|
15753
|
+
throw new RuntimeNotFoundError(engine.runtime);
|
|
15754
|
+
}
|
|
15755
|
+
return handler(engine, ctx);
|
|
15756
|
+
}
|
|
15757
|
+
/**
|
|
15758
|
+
* Normalizes any result to AgentOutput.
|
|
15759
|
+
* If agent returns void/undefined, uses empty object.
|
|
15760
|
+
* If returns object with known fields, extracts them.
|
|
15761
|
+
*/
|
|
15762
|
+
normalizeOutput(result) {
|
|
15763
|
+
if (result === void 0 || result === null) {
|
|
15764
|
+
return {};
|
|
15765
|
+
}
|
|
15766
|
+
if (typeof result === "object") {
|
|
15767
|
+
const obj = result;
|
|
15768
|
+
const output = {
|
|
15769
|
+
data: obj["data"] ?? obj
|
|
15770
|
+
};
|
|
15771
|
+
const message = obj["message"];
|
|
15772
|
+
if (typeof message === "string") {
|
|
15773
|
+
output.message = message;
|
|
15774
|
+
}
|
|
15775
|
+
const artifacts = obj["artifacts"];
|
|
15776
|
+
if (Array.isArray(artifacts)) {
|
|
15777
|
+
output.artifacts = artifacts;
|
|
15778
|
+
}
|
|
15779
|
+
const metadata = obj["metadata"];
|
|
15780
|
+
if (typeof metadata === "object" && metadata !== null) {
|
|
15781
|
+
output.metadata = metadata;
|
|
15782
|
+
}
|
|
15783
|
+
return output;
|
|
15784
|
+
}
|
|
15785
|
+
return { data: result };
|
|
15786
|
+
}
|
|
15787
|
+
};
|
|
15788
|
+
|
|
15789
|
+
// src/runner/agent_runner_module.ts
|
|
15790
|
+
var VALID_ENGINE_TYPES = ["local", "api", "mcp", "custom"];
|
|
15791
|
+
var AgentRunnerModule = class {
|
|
15792
|
+
gitgovPath;
|
|
15793
|
+
projectRoot;
|
|
15794
|
+
identityAdapter;
|
|
15795
|
+
executionAdapter;
|
|
15796
|
+
eventBus;
|
|
15797
|
+
/** Fase 2: Protocol handlers for CustomBackend */
|
|
15798
|
+
protocolHandlers;
|
|
15799
|
+
runtimeHandlers;
|
|
15800
|
+
localBackend;
|
|
15801
|
+
constructor(deps) {
|
|
15802
|
+
if (!deps.executionAdapter) {
|
|
15803
|
+
throw new MissingDependencyError("ExecutionAdapter", "required");
|
|
15804
|
+
}
|
|
15805
|
+
this.gitgovPath = deps.gitgovPath ?? path6__default.join(ConfigManager.findProjectRoot(), ".gitgov");
|
|
15806
|
+
this.projectRoot = deps.projectRoot ?? ConfigManager.findProjectRoot();
|
|
15807
|
+
this.identityAdapter = deps.identityAdapter ?? void 0;
|
|
15808
|
+
this.executionAdapter = deps.executionAdapter;
|
|
15809
|
+
this.eventBus = deps.eventBus ?? void 0;
|
|
15810
|
+
this.protocolHandlers = deps.protocolHandlers ?? void 0;
|
|
15811
|
+
this.runtimeHandlers = deps.runtimeHandlers ?? void 0;
|
|
15812
|
+
this.localBackend = new LocalBackend(this.projectRoot, this.runtimeHandlers);
|
|
15813
|
+
}
|
|
15814
|
+
/**
|
|
15815
|
+
* Executes an agent once and returns the response.
|
|
15816
|
+
* TaskRecord must exist before calling this method.
|
|
15817
|
+
*/
|
|
15818
|
+
async runOnce(opts) {
|
|
15819
|
+
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
15820
|
+
const runId = randomUUID();
|
|
15821
|
+
let output;
|
|
15822
|
+
let error;
|
|
15823
|
+
let status = "success";
|
|
15824
|
+
const agent = await this.loadAgent(opts.agentId);
|
|
15825
|
+
const engine = agent.engine;
|
|
15826
|
+
const engineType = engine.type;
|
|
15827
|
+
if (!VALID_ENGINE_TYPES.includes(engineType)) {
|
|
15828
|
+
throw new UnsupportedEngineTypeError(engineType);
|
|
15829
|
+
}
|
|
15830
|
+
if ((engineType === "api" || engineType === "mcp") && !("url" in engine)) {
|
|
15831
|
+
throw new EngineConfigError(engineType, "url");
|
|
15832
|
+
}
|
|
15833
|
+
if (engineType === "api" || engineType === "mcp") {
|
|
15834
|
+
const engineWithAuth = engine;
|
|
15835
|
+
if (engineWithAuth.auth?.type === "actor-signature" && !this.identityAdapter) {
|
|
15836
|
+
throw new MissingDependencyError(
|
|
15837
|
+
"IdentityAdapter",
|
|
15838
|
+
"required for actor-signature auth"
|
|
15839
|
+
);
|
|
15840
|
+
}
|
|
15841
|
+
}
|
|
15842
|
+
const ctx = {
|
|
15843
|
+
agentId: opts.agentId,
|
|
15844
|
+
actorId: opts.actorId ?? opts.agentId,
|
|
15845
|
+
// [EARS-C2]
|
|
15846
|
+
taskId: opts.taskId,
|
|
15847
|
+
runId,
|
|
15848
|
+
input: opts.input
|
|
15849
|
+
};
|
|
15850
|
+
this.emitEvent({
|
|
15851
|
+
type: "agent:started",
|
|
15852
|
+
payload: { runId, agentId: opts.agentId, taskId: opts.taskId, startedAt }
|
|
15853
|
+
});
|
|
15854
|
+
try {
|
|
15855
|
+
switch (engineType) {
|
|
15856
|
+
case "local":
|
|
15857
|
+
output = await this.localBackend.execute(engine, ctx);
|
|
15858
|
+
break;
|
|
15859
|
+
case "api":
|
|
15860
|
+
throw new Error("ApiBackend not implemented (Fase 2)");
|
|
15861
|
+
case "mcp":
|
|
15862
|
+
throw new Error("McpBackend not implemented (Fase 2)");
|
|
15863
|
+
case "custom":
|
|
15864
|
+
throw new Error("CustomBackend not implemented (Fase 2)");
|
|
15865
|
+
}
|
|
15866
|
+
} catch (err) {
|
|
15867
|
+
status = "error";
|
|
15868
|
+
error = err.message;
|
|
15869
|
+
}
|
|
15870
|
+
const completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
15871
|
+
const durationMs = new Date(completedAt).getTime() - new Date(startedAt).getTime();
|
|
15872
|
+
const resultMessage = status === "success" ? output?.message || `Agent ${opts.agentId} completed successfully` : `Agent ${opts.agentId} failed: ${error || "Unknown error"}`;
|
|
15873
|
+
const executionRecord = await this.executionAdapter.create(
|
|
15874
|
+
{
|
|
15875
|
+
taskId: opts.taskId,
|
|
15876
|
+
type: status === "success" ? "completion" : "blocker",
|
|
15877
|
+
title: `Agent execution: ${opts.agentId}`,
|
|
15878
|
+
result: resultMessage.length >= 10 ? resultMessage : resultMessage.padEnd(10, "."),
|
|
15879
|
+
metadata: {
|
|
15880
|
+
agentId: opts.agentId,
|
|
15881
|
+
runId,
|
|
15882
|
+
status,
|
|
15883
|
+
output: status === "success" ? output : void 0,
|
|
15884
|
+
error: status === "error" ? error : void 0,
|
|
15885
|
+
startedAt,
|
|
15886
|
+
completedAt,
|
|
15887
|
+
durationMs
|
|
15888
|
+
}
|
|
15889
|
+
},
|
|
15890
|
+
ctx.actorId
|
|
15891
|
+
);
|
|
15892
|
+
const executionRecordId = executionRecord.id;
|
|
15893
|
+
if (status === "success") {
|
|
15894
|
+
this.emitEvent({
|
|
15895
|
+
type: "agent:completed",
|
|
15896
|
+
payload: {
|
|
15897
|
+
runId,
|
|
15898
|
+
agentId: opts.agentId,
|
|
15899
|
+
taskId: opts.taskId,
|
|
15900
|
+
status,
|
|
15901
|
+
durationMs,
|
|
15902
|
+
executionRecordId
|
|
15903
|
+
}
|
|
15904
|
+
});
|
|
15905
|
+
} else {
|
|
15906
|
+
this.emitEvent({
|
|
15907
|
+
type: "agent:error",
|
|
15908
|
+
payload: {
|
|
15909
|
+
runId,
|
|
15910
|
+
agentId: opts.agentId,
|
|
15911
|
+
taskId: opts.taskId,
|
|
15912
|
+
status,
|
|
15913
|
+
error,
|
|
15914
|
+
durationMs,
|
|
15915
|
+
executionRecordId
|
|
15916
|
+
}
|
|
15917
|
+
});
|
|
15918
|
+
}
|
|
15919
|
+
const response = {
|
|
15920
|
+
runId,
|
|
15921
|
+
agentId: opts.agentId,
|
|
15922
|
+
status,
|
|
15923
|
+
executionRecordId,
|
|
15924
|
+
startedAt,
|
|
15925
|
+
completedAt,
|
|
15926
|
+
durationMs
|
|
15927
|
+
};
|
|
15928
|
+
if (status === "success" && output) {
|
|
15929
|
+
response.output = output;
|
|
15930
|
+
}
|
|
15931
|
+
if (status === "error" && error) {
|
|
15932
|
+
response.error = error;
|
|
15933
|
+
}
|
|
15934
|
+
return response;
|
|
15935
|
+
}
|
|
15936
|
+
/**
|
|
15937
|
+
* [EARS-A1, A2] Loads AgentRecord from .gitgov/agents/agent-{id}.json
|
|
15938
|
+
*/
|
|
15939
|
+
async loadAgent(agentId) {
|
|
15940
|
+
const id = agentId.startsWith("agent:") ? agentId.slice(6) : agentId;
|
|
15941
|
+
const agentPath = path6__default.join(this.gitgovPath, "agents", `agent-${id}.json`);
|
|
15942
|
+
try {
|
|
15943
|
+
const content = await promises.readFile(agentPath, "utf-8");
|
|
15944
|
+
const record = JSON.parse(content);
|
|
15945
|
+
return record.payload ?? record;
|
|
15946
|
+
} catch {
|
|
15947
|
+
throw new AgentNotFoundError(agentId);
|
|
15948
|
+
}
|
|
15949
|
+
}
|
|
15950
|
+
/**
|
|
15951
|
+
* [EARS-I4] Emits event via EventBus if available.
|
|
15952
|
+
* Works silently without EventBus.
|
|
15953
|
+
*/
|
|
15954
|
+
emitEvent(event) {
|
|
15955
|
+
if (this.eventBus) {
|
|
15956
|
+
this.eventBus.publish({
|
|
15957
|
+
type: event.type,
|
|
15958
|
+
timestamp: Date.now(),
|
|
15959
|
+
source: "agent_runner_module",
|
|
15960
|
+
payload: event.payload
|
|
15961
|
+
});
|
|
15962
|
+
}
|
|
15963
|
+
}
|
|
15964
|
+
};
|
|
15965
|
+
|
|
15966
|
+
export { adapters_exports as Adapters, backlog_adapter_exports as BacklogAdapter, changelog_adapter_exports as ChangelogAdapter, config_manager_exports as Config, crypto_exports as Crypto, diagram_generator_exports as DiagramGenerator, event_bus_exports as EventBus, execution_adapter_exports as ExecutionAdapter, factories_exports as Factories, feedback_adapter_exports as FeedbackAdapter, git_exports as Git, identity_adapter_exports as IdentityAdapter, indexer_adapter_exports as IndexerAdapter, lint_exports as Lint, logger_exports as Logger, metrics_adapter_exports as MetricsAdapter, pii_detector_exports as PiiDetector, project_adapter_exports as ProjectAdapter, types_exports as Records, runner_exports as Runner, schemas_exports as Schemas, source_auditor_exports as SourceAuditor, store_exports as Store, sync_exports as Sync, validation_exports as Validation, workflow_methodology_adapter_exports as WorkflowMethodologyAdapter };
|
|
15622
15967
|
//# sourceMappingURL=index.js.map
|
|
15623
15968
|
//# sourceMappingURL=index.js.map
|