@dudousxd/nestjs-agent-opencode 1.0.0 → 2.0.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/README.md +88 -0
- package/dist/durable/index.cjs +617 -43
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.d.cts +11 -5
- package/dist/durable/index.d.ts +11 -5
- package/dist/durable/index.js +620 -46
- package/dist/durable/index.js.map +1 -1
- package/dist/{engine-BX6MLzxs.d.cts → engine-yFh3eD8j.d.cts} +241 -7
- package/dist/{engine-BX6MLzxs.d.ts → engine-yFh3eD8j.d.ts} +241 -7
- package/dist/index.cjs +595 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +594 -26
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/dist/durable/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentEngine } from '@dudousxd/nestjs-agent';
|
|
2
|
-
import { O as OpenCodeTurns, a as OpenCodeEngineSettings, b as OpenCodeHost, c as OpenCodeEngineOptions } from '../engine-
|
|
2
|
+
import { O as OpenCodeTurns, a as OpenCodeEngineSettings, b as OpenCodeHost, c as OpenCodeTurnStop, d as OpenCodeEngineOptions } from '../engine-yFh3eD8j.cjs';
|
|
3
3
|
import { AgentRunner, AgentStore, AgentRunInput, AgentRunStartOptions, HumanReply } from '@dudousxd/nestjs-agent-core';
|
|
4
4
|
import { WorkflowService } from '@dudousxd/nestjs-durable';
|
|
5
5
|
import { RunGateway, WorkflowCtx } from '@dudousxd/nestjs-durable-core';
|
|
@@ -41,6 +41,14 @@ declare class DurableOpenCodeAgentRunner implements AgentRunner {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
declare const OPENCODE_RUN_WORKFLOW = "agent.opencode.run";
|
|
44
|
+
/**
|
|
45
|
+
* What a turn's workflow run returns: how it ended, and the reason of a stop that landed on it (a
|
|
46
|
+
* limit, or `stopTurn`) — `failed` when the stop aborted it, `succeeded` when the answer was kept.
|
|
47
|
+
*/
|
|
48
|
+
interface OpenCodeRunWorkflowResult {
|
|
49
|
+
outcome: string;
|
|
50
|
+
stop?: OpenCodeTurnStop['reason'];
|
|
51
|
+
}
|
|
44
52
|
/** The token a person's answer to `toolCallId` is signalled under — the library's own convention. */
|
|
45
53
|
declare function decisionToken(runId: string, toolCallId: string): string;
|
|
46
54
|
/**
|
|
@@ -60,9 +68,7 @@ declare class OpenCodeRunWorkflow {
|
|
|
60
68
|
private readonly turns;
|
|
61
69
|
private readonly runs?;
|
|
62
70
|
constructor(turns: OpenCodeTurns, runs?: RunGateway | undefined);
|
|
63
|
-
run(ctx: WorkflowCtx, input: AgentRunInput): Promise<
|
|
64
|
-
outcome: string;
|
|
65
|
-
}>;
|
|
71
|
+
run(ctx: WorkflowCtx, input: AgentRunInput): Promise<OpenCodeRunWorkflowResult>;
|
|
66
72
|
private cancelled;
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -73,4 +79,4 @@ declare class OpenCodeRunWorkflow {
|
|
|
73
79
|
*/
|
|
74
80
|
declare function openCodeDurable(options: OpenCodeEngineOptions): AgentEngine;
|
|
75
81
|
|
|
76
|
-
export { DurableOpenCodeAgentRunner, OPENCODE_RUN_WORKFLOW, OpenCodeRunWorkflow, decisionToken, openCodeDurable };
|
|
82
|
+
export { DurableOpenCodeAgentRunner, OPENCODE_RUN_WORKFLOW, OpenCodeRunWorkflow, type OpenCodeRunWorkflowResult, decisionToken, openCodeDurable };
|
package/dist/durable/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentEngine } from '@dudousxd/nestjs-agent';
|
|
2
|
-
import { O as OpenCodeTurns, a as OpenCodeEngineSettings, b as OpenCodeHost, c as OpenCodeEngineOptions } from '../engine-
|
|
2
|
+
import { O as OpenCodeTurns, a as OpenCodeEngineSettings, b as OpenCodeHost, c as OpenCodeTurnStop, d as OpenCodeEngineOptions } from '../engine-yFh3eD8j.js';
|
|
3
3
|
import { AgentRunner, AgentStore, AgentRunInput, AgentRunStartOptions, HumanReply } from '@dudousxd/nestjs-agent-core';
|
|
4
4
|
import { WorkflowService } from '@dudousxd/nestjs-durable';
|
|
5
5
|
import { RunGateway, WorkflowCtx } from '@dudousxd/nestjs-durable-core';
|
|
@@ -41,6 +41,14 @@ declare class DurableOpenCodeAgentRunner implements AgentRunner {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
declare const OPENCODE_RUN_WORKFLOW = "agent.opencode.run";
|
|
44
|
+
/**
|
|
45
|
+
* What a turn's workflow run returns: how it ended, and the reason of a stop that landed on it (a
|
|
46
|
+
* limit, or `stopTurn`) — `failed` when the stop aborted it, `succeeded` when the answer was kept.
|
|
47
|
+
*/
|
|
48
|
+
interface OpenCodeRunWorkflowResult {
|
|
49
|
+
outcome: string;
|
|
50
|
+
stop?: OpenCodeTurnStop['reason'];
|
|
51
|
+
}
|
|
44
52
|
/** The token a person's answer to `toolCallId` is signalled under — the library's own convention. */
|
|
45
53
|
declare function decisionToken(runId: string, toolCallId: string): string;
|
|
46
54
|
/**
|
|
@@ -60,9 +68,7 @@ declare class OpenCodeRunWorkflow {
|
|
|
60
68
|
private readonly turns;
|
|
61
69
|
private readonly runs?;
|
|
62
70
|
constructor(turns: OpenCodeTurns, runs?: RunGateway | undefined);
|
|
63
|
-
run(ctx: WorkflowCtx, input: AgentRunInput): Promise<
|
|
64
|
-
outcome: string;
|
|
65
|
-
}>;
|
|
71
|
+
run(ctx: WorkflowCtx, input: AgentRunInput): Promise<OpenCodeRunWorkflowResult>;
|
|
66
72
|
private cancelled;
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -73,4 +79,4 @@ declare class OpenCodeRunWorkflow {
|
|
|
73
79
|
*/
|
|
74
80
|
declare function openCodeDurable(options: OpenCodeEngineOptions): AgentEngine;
|
|
75
81
|
|
|
76
|
-
export { DurableOpenCodeAgentRunner, OPENCODE_RUN_WORKFLOW, OpenCodeRunWorkflow, decisionToken, openCodeDurable };
|
|
82
|
+
export { DurableOpenCodeAgentRunner, OPENCODE_RUN_WORKFLOW, OpenCodeRunWorkflow, type OpenCodeRunWorkflowResult, decisionToken, openCodeDurable };
|