@dudousxd/nestjs-agent-opencode 0.4.1 → 0.5.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/durable/index.cjs +11 -1
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.js +12 -2
- package/dist/durable/index.js.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/durable/index.js
CHANGED
|
@@ -1864,7 +1864,7 @@ import { Inject as Inject3, Injectable as Injectable2 } from "@nestjs/common";
|
|
|
1864
1864
|
// src/turns.ts
|
|
1865
1865
|
import { randomUUID } from "crypto";
|
|
1866
1866
|
import { AGENT_CHAT_QUEUE } from "@dudousxd/nestjs-agent";
|
|
1867
|
-
import { AGENT_DEPS_FACTORY, AGENT_MEMORY, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_SINK, AGENT_SKILLS, AGENT_STORE, AGENT_TOOL_REGISTRY, DEFAULT_MAX_FACT_CHARS, DefaultApprovalPolicy, ModelPriceResolver, RUN_ENDED_BEFORE_TOOL_CALL, actorScope, buildMemoryBlock, defaultScopeResolver, encodeStreamEvent as encodeStreamEvent2, memoryWriteVerdict, parseBedrockModelId, publishAgentRunFailed, releaseThreadRun, resolveMemoryDigest, resolveSkillCatalog, resolveUsageCost, streamFailure } from "@dudousxd/nestjs-agent-core";
|
|
1867
|
+
import { AGENT_DEPS_FACTORY, AGENT_MEMORY, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_SINK, AGENT_SKILLS, AGENT_STORE, AGENT_TOOL_REGISTRY, DEFAULT_MAX_FACT_CHARS, DefaultApprovalPolicy, ModelPriceResolver, RUN_ENDED_BEFORE_TOOL_CALL, actorScope, agentRunContext, buildMemoryBlock, defaultScopeResolver, encodeStreamEvent as encodeStreamEvent2, memoryWriteVerdict, parseBedrockModelId, publishAgentRunCancelled, publishAgentRunFailed, releaseThreadRun, resolveMemoryDigest, resolveSkillCatalog, resolveUsageCost, streamFailure } from "@dudousxd/nestjs-agent-core";
|
|
1868
1868
|
import { Inject as Inject2, Injectable, Logger as Logger2, Optional } from "@nestjs/common";
|
|
1869
1869
|
|
|
1870
1870
|
// src/event-hub.ts
|
|
@@ -2978,6 +2978,12 @@ ${body}
|
|
|
2978
2978
|
kind: "cancelled"
|
|
2979
2979
|
}));
|
|
2980
2980
|
await writer.end();
|
|
2981
|
+
publishAgentRunCancelled({
|
|
2982
|
+
runId,
|
|
2983
|
+
threadId: input.threadId,
|
|
2984
|
+
durationMs,
|
|
2985
|
+
context: agentRunContext(input)
|
|
2986
|
+
});
|
|
2981
2987
|
await this.store.recordRunEnd?.({
|
|
2982
2988
|
runId,
|
|
2983
2989
|
status: "cancelled",
|
|
@@ -3008,12 +3014,16 @@ ${body}
|
|
|
3008
3014
|
this.logger.error(`agent run ${runId} failed: ${error}`);
|
|
3009
3015
|
publishAgentRunFailed({
|
|
3010
3016
|
runId,
|
|
3017
|
+
threadId: input.threadId,
|
|
3011
3018
|
code: "opencode_failed",
|
|
3012
|
-
message: error
|
|
3019
|
+
message: error,
|
|
3020
|
+
durationMs,
|
|
3021
|
+
context: agentRunContext(input)
|
|
3013
3022
|
});
|
|
3014
3023
|
await this.store.recordRunEnd?.({
|
|
3015
3024
|
runId,
|
|
3016
3025
|
status: "failed",
|
|
3026
|
+
durationMs,
|
|
3017
3027
|
errorCode: "opencode_failed",
|
|
3018
3028
|
errorMessage: error
|
|
3019
3029
|
});
|