lalph 0.3.111 → 0.3.113

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.111",
4
+ "version": "0.3.113",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -37,17 +37,17 @@
37
37
  "devDependencies": {
38
38
  "@changesets/changelog-github": "^0.6.0",
39
39
  "@changesets/cli": "^2.30.0",
40
- "@effect/ai-openai": "4.0.0-beta.39",
41
- "@effect/ai-openai-compat": "4.0.0-beta.39",
40
+ "@effect/ai-openai": "4.0.0-beta.40",
41
+ "@effect/ai-openai-compat": "4.0.0-beta.40",
42
42
  "@effect/language-service": "^0.83.1",
43
- "@effect/platform-node": "4.0.0-beta.39",
44
- "@linear/sdk": "^79.0.0",
43
+ "@effect/platform-node": "4.0.0-beta.40",
44
+ "@linear/sdk": "^80.0.0",
45
45
  "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
46
46
  "@octokit/types": "^16.0.0",
47
47
  "@typescript/native-preview": "7.0.0-dev.20260324.1",
48
- "clanka": "^0.2.36",
48
+ "clanka": "^0.2.38",
49
49
  "concurrently": "^9.2.1",
50
- "effect": "4.0.0-beta.39",
50
+ "effect": "4.0.0-beta.40",
51
51
  "husky": "^9.1.7",
52
52
  "lint-staged": "^16.4.0",
53
53
  "octokit": "^5.0.5",
@@ -40,7 +40,6 @@ export const agentChooser = Effect.fnUntraced(function* (options: {
40
40
  directory: worktree.directory,
41
41
  model: options.preset.extraArgs.join(" "),
42
42
  prompt: promptGen.promptChooseClanka({ gitFlow }),
43
- stallTimeout: options.stallTimeout,
44
43
  mode: "choose",
45
44
  }).pipe(
46
45
  Effect.provideService(ChosenTaskDeferred, deferred),
@@ -74,7 +73,7 @@ export const agentChooser = Effect.fnUntraced(function* (options: {
74
73
  }),
75
74
  Effect.timeoutOrElse({
76
75
  duration: options.stallTimeout,
77
- onTimeout: () => Effect.fail(new RunnerStalled()),
76
+ orElse: () => Effect.fail(new RunnerStalled()),
78
77
  }),
79
78
  Effect.raceFirst(taskJsonCreated),
80
79
  )
@@ -22,7 +22,6 @@ export const agentChooserRalph = Effect.fnUntraced(function* (options: {
22
22
  directory: worktree.directory,
23
23
  model: options.preset.extraArgs.join(" "),
24
24
  prompt: promptGen.promptChooseRalph({ specFile: options.specFile }),
25
- stallTimeout: options.stallTimeout,
26
25
  mode: "ralph",
27
26
  })
28
27
  } else {
@@ -39,7 +38,7 @@ export const agentChooserRalph = Effect.fnUntraced(function* (options: {
39
38
  }),
40
39
  Effect.timeoutOrElse({
41
40
  duration: options.stallTimeout,
42
- onTimeout: () => Effect.fail(new RunnerStalled()),
41
+ orElse: () => Effect.fail(new RunnerStalled()),
43
42
  }),
44
43
  )
45
44
  }
@@ -26,6 +26,5 @@ export const agentResearcher = Effect.fnUntraced(function* (options: {
26
26
  prompt: promptGen.promptResearch({
27
27
  task: options.task,
28
28
  }),
29
- stallTimeout: options.stallTimeout,
30
29
  }).pipe(Effect.asSome)
31
30
  })
@@ -48,7 +48,6 @@ export const agentReviewer = Effect.fnUntraced(function* (options: {
48
48
  gitFlow,
49
49
  }),
50
50
  ),
51
- stallTimeout: options.stallTimeout,
52
51
  mode,
53
52
  })
54
53
  return ExitCode(0)
@@ -47,7 +47,6 @@ 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,
51
50
  mode: timeoutMode.mode,
52
51
  })
53
52
  return ExitCode(0)
@@ -48,7 +48,6 @@ ${research}`,
48
48
  },
49
49
  ]),
50
50
  }),
51
- stallTimeout: options.stallTimeout,
52
51
  maxContext: options.maxContext,
53
52
  steer: options.steer,
54
53
  mode: CurrentTask.$match(options.currentTask, {
package/src/Clanka.ts CHANGED
@@ -3,7 +3,6 @@ import * as OutputFormatter from "clanka/OutputFormatter"
3
3
  import {
4
4
  Cause,
5
5
  Config,
6
- Duration,
7
6
  Effect,
8
7
  identity,
9
8
  Layer,
@@ -15,7 +14,6 @@ import {
15
14
  import { Prompt as CliPrompt } from "effect/unstable/cli"
16
15
  import { TaskChooseTools, TaskTools, TaskToolsHandlers } from "./TaskTools.ts"
17
16
  import { layerClankaModel, ModelServices } from "./ClankaModels.ts"
18
- import { withStallTimeout } from "./shared/stream.ts"
19
17
  import { NodeHttpClient } from "@effect/platform-node"
20
18
  import type { Prompt } from "effect/unstable/ai"
21
19
  import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai"
@@ -74,7 +72,6 @@ export const runClanka = Effect.fnUntraced(
74
72
  readonly model: string
75
73
  readonly prompt: Prompt.RawInput
76
74
  readonly system?: string | undefined
77
- readonly stallTimeout?: Duration.Input | undefined
78
75
  readonly maxContext?: number | undefined
79
76
  readonly steer?: Stream.Stream<string> | undefined
80
77
  readonly mode?: "ralph" | "choose" | "default" | undefined
@@ -89,10 +86,6 @@ export const runClanka = Effect.fnUntraced(
89
86
 
90
87
  yield* muxer.add(output)
91
88
 
92
- let stream = options.stallTimeout
93
- ? withStallTimeout(options.stallTimeout)(output)
94
- : output
95
-
96
89
  if (options.steer) {
97
90
  yield* options.steer.pipe(
98
91
  Stream.switchMap(
@@ -106,7 +99,7 @@ export const runClanka = Effect.fnUntraced(
106
99
  )
107
100
  }
108
101
 
109
- return yield* stream.pipe(
102
+ return yield* output.pipe(
110
103
  options.maxContext
111
104
  ? Stream.tap((part) => {
112
105
  if (part._tag !== "Usage") return Effect.void
@@ -169,7 +169,7 @@ const run = Effect.fnUntraced(
169
169
  yield* source.ensureInProgress(projectId, taskId).pipe(
170
170
  Effect.timeoutOrElse({
171
171
  duration: "1 minute",
172
- onTimeout: () => Effect.fail(new RunnerStalled()),
172
+ orElse: () => Effect.fail(new RunnerStalled()),
173
173
  }),
174
174
  )
175
175