lalph 0.3.113 → 0.3.115
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/cli.mjs +269 -310
- package/package.json +4 -4
- package/src/Agents/chooser.ts +1 -0
- package/src/Agents/researcher.ts +1 -0
- package/src/Agents/reviewer.ts +1 -0
- package/src/Agents/timeout.ts +1 -0
- package/src/Agents/worker.ts +1 -0
- package/src/Clanka.ts +8 -1
- package/src/IssueSource.ts +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lalph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.115",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@linear/sdk": "^80.0.0",
|
|
45
45
|
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
|
46
46
|
"@octokit/types": "^16.0.0",
|
|
47
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
48
|
-
"clanka": "^0.2.
|
|
47
|
+
"@typescript/native-preview": "7.0.0-dev.20260326.1",
|
|
48
|
+
"clanka": "^0.2.41",
|
|
49
49
|
"concurrently": "^9.2.1",
|
|
50
50
|
"effect": "4.0.0-beta.40",
|
|
51
51
|
"husky": "^9.1.7",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"octokit": "^5.0.5",
|
|
54
54
|
"oxlint": "^1.57.0",
|
|
55
55
|
"prettier": "^3.8.1",
|
|
56
|
-
"tsdown": "^0.21.
|
|
56
|
+
"tsdown": "^0.21.5",
|
|
57
57
|
"typescript": "^6.0.2",
|
|
58
58
|
"yaml": "^2.8.3"
|
|
59
59
|
},
|
package/src/Agents/chooser.ts
CHANGED
|
@@ -41,6 +41,7 @@ export const agentChooser = Effect.fnUntraced(function* (options: {
|
|
|
41
41
|
model: options.preset.extraArgs.join(" "),
|
|
42
42
|
prompt: promptGen.promptChooseClanka({ gitFlow }),
|
|
43
43
|
mode: "choose",
|
|
44
|
+
stallTimeout: options.stallTimeout,
|
|
44
45
|
}).pipe(
|
|
45
46
|
Effect.provideService(ChosenTaskDeferred, deferred),
|
|
46
47
|
Effect.flatMap(() => Effect.fail(new ChosenTaskNotFound())),
|
package/src/Agents/researcher.ts
CHANGED
package/src/Agents/reviewer.ts
CHANGED
package/src/Agents/timeout.ts
CHANGED
|
@@ -47,6 +47,7 @@ export const agentTimeout = Effect.fnUntraced(function* (options: {
|
|
|
47
47
|
model: options.preset.extraArgs.join(" "),
|
|
48
48
|
system: timeoutMode.system,
|
|
49
49
|
prompt: timeoutMode.clankaPrompt,
|
|
50
|
+
stallTimeout: options.stallTimeout,
|
|
50
51
|
mode: timeoutMode.mode,
|
|
51
52
|
})
|
|
52
53
|
return ExitCode(0)
|
package/src/Agents/worker.ts
CHANGED
package/src/Clanka.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as OutputFormatter from "clanka/OutputFormatter"
|
|
|
3
3
|
import {
|
|
4
4
|
Cause,
|
|
5
5
|
Config,
|
|
6
|
+
Duration,
|
|
6
7
|
Effect,
|
|
7
8
|
identity,
|
|
8
9
|
Layer,
|
|
@@ -19,6 +20,7 @@ import type { Prompt } from "effect/unstable/ai"
|
|
|
19
20
|
import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai"
|
|
20
21
|
import { Worktree } from "./Worktree.ts"
|
|
21
22
|
import { SemanticSearch } from "clanka"
|
|
23
|
+
import { withStallTimeout } from "./shared/stream.ts"
|
|
22
24
|
|
|
23
25
|
export const ClankaMuxerLayer = Layer.effectDiscard(
|
|
24
26
|
Effect.gen(function* () {
|
|
@@ -73,6 +75,7 @@ export const runClanka = Effect.fnUntraced(
|
|
|
73
75
|
readonly prompt: Prompt.RawInput
|
|
74
76
|
readonly system?: string | undefined
|
|
75
77
|
readonly maxContext?: number | undefined
|
|
78
|
+
readonly stallTimeout?: Duration.Duration | undefined
|
|
76
79
|
readonly steer?: Stream.Stream<string> | undefined
|
|
77
80
|
readonly mode?: "ralph" | "choose" | "default" | undefined
|
|
78
81
|
}) {
|
|
@@ -99,7 +102,11 @@ export const runClanka = Effect.fnUntraced(
|
|
|
99
102
|
)
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
|
|
105
|
+
const stream = options.stallTimeout
|
|
106
|
+
? withStallTimeout(options.stallTimeout)(output)
|
|
107
|
+
: output
|
|
108
|
+
|
|
109
|
+
return yield* stream.pipe(
|
|
103
110
|
options.maxContext
|
|
104
111
|
? Stream.tap((part) => {
|
|
105
112
|
if (part._tag !== "Usage") return Effect.void
|
package/src/IssueSource.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
Effect,
|
|
6
6
|
FiberHandle,
|
|
7
7
|
Option,
|
|
8
|
+
Schedule,
|
|
8
9
|
Schema,
|
|
9
10
|
ScopedCache,
|
|
10
11
|
ServiceMap,
|
|
@@ -114,8 +115,9 @@ export class IssueSource extends ServiceMap.Service<
|
|
|
114
115
|
Effect.tap((issues) =>
|
|
115
116
|
SubscriptionRef.set(ref, IssuesChange.External({ issues })),
|
|
116
117
|
),
|
|
117
|
-
Effect.ignoreCause,
|
|
118
118
|
Effect.delay(Duration.seconds(30)),
|
|
119
|
+
Effect.sandbox,
|
|
120
|
+
Effect.retry(Schedule.forever),
|
|
119
121
|
Stream.fromEffectDrain,
|
|
120
122
|
),
|
|
121
123
|
),
|