lalph 0.3.0 → 0.3.2

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 CHANGED
@@ -67404,10 +67404,10 @@ const opencode = new CliAgent({
67404
67404
  name: "opencode",
67405
67405
  command: ({ prompt, prdFilePath, extraArgs }) => make$23("opencode", [
67406
67406
  "run",
67407
+ prompt,
67407
67408
  ...extraArgs,
67408
67409
  "-f",
67409
- prdFilePath,
67410
- prompt
67410
+ prdFilePath
67411
67411
  ], {
67412
67412
  extendEnv: true,
67413
67413
  env: { OPENCODE_PERMISSION: "{\"*\":\"allow\", \"question\":\"deny\"}" },
@@ -67415,13 +67415,9 @@ const opencode = new CliAgent({
67415
67415
  stderr: "pipe",
67416
67416
  stdin: "inherit"
67417
67417
  }),
67418
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) => make$23("opencode", [
67419
- ...extraArgs,
67420
- "--prompt",
67421
- `@${prdFilePath}
67418
+ commandPlan: ({ prompt, prdFilePath, dangerous }) => make$23("opencode", ["--prompt", `@${prdFilePath}
67422
67419
 
67423
- ${prompt}`
67424
- ], {
67420
+ ${prompt}`], {
67425
67421
  extendEnv: true,
67426
67422
  ...dangerous ? { env: { OPENCODE_PERMISSION: "{\"*\":\"allow\"}" } } : {},
67427
67423
  stdout: "inherit",
@@ -67449,13 +67445,9 @@ ${prompt}`
67449
67445
  stdin: "inherit"
67450
67446
  }),
67451
67447
  outputTransformer: claudeOutputTransformer,
67452
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) => make$23("claude", [
67453
- ...dangerous ? ["--dangerously-skip-permissions"] : [],
67454
- ...extraArgs,
67455
- `@${prdFilePath}
67448
+ commandPlan: ({ prompt, prdFilePath, dangerous }) => make$23("claude", [...dangerous ? ["--dangerously-skip-permissions"] : [], `@${prdFilePath}
67456
67449
 
67457
- ${prompt}`
67458
- ], {
67450
+ ${prompt}`], {
67459
67451
  stdout: "inherit",
67460
67452
  stderr: "inherit",
67461
67453
  stdin: "inherit"
@@ -67476,13 +67468,9 @@ ${prompt}`
67476
67468
  stderr: "pipe",
67477
67469
  stdin: "inherit"
67478
67470
  }),
67479
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) => make$23("codex", [
67480
- ...extraArgs,
67481
- ...dangerous ? ["--dangerously-bypass-approvals-and-sandbox"] : [],
67482
- `@${prdFilePath}
67471
+ commandPlan: ({ prompt, prdFilePath, dangerous }) => make$23("codex", [...dangerous ? ["--dangerously-bypass-approvals-and-sandbox"] : [], `@${prdFilePath}
67483
67472
 
67484
- ${prompt}`
67485
- ], {
67473
+ ${prompt}`], {
67486
67474
  stdout: "inherit",
67487
67475
  stderr: "inherit",
67488
67476
  stdin: "inherit"
@@ -144393,7 +144381,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
144393
144381
  console.log(` Label filter: ${resolveLabel(label)}`);
144394
144382
  console.log(` Auto-merge label: ${resolveAutoMergeLabel(autoMergeLabel)}`);
144395
144383
  }, mapError$2((cause) => new IssueSourceError({ cause }))),
144396
- issueCliAgentPreset: (_issue) => sync(() => fromUndefinedOr(presetMap.get(_issue.id))),
144384
+ issueCliAgentPreset: (issue) => sync(() => fromUndefinedOr(presetMap.get(issue.id))),
144397
144385
  updateCliAgentPreset: fnUntraced(function* (preset) {
144398
144386
  const labels = yield* runCollect(linear.labels).pipe(mapError$2((cause) => new IssueSourceError({ cause })));
144399
144387
  const labelId = yield* autoComplete({
@@ -151954,7 +151942,7 @@ const agentWorker = fnUntraced(function* (options) {
151954
151942
  return yield* pipe(options.preset.cliAgent.command({
151955
151943
  prompt: options.prompt,
151956
151944
  prdFilePath: pathService.join(".lalph", "prd.yml"),
151957
- extraArgs: []
151945
+ extraArgs: options.preset.extraArgs
151958
151946
  }), setCwd(worktree.directory), options.preset.withCommandPrefix).pipe(worktree.execWithStallTimeout({
151959
151947
  cliAgent: options.preset.cliAgent,
151960
151948
  stallTimeout: options.stallTimeout
@@ -152313,8 +152301,7 @@ const agentPlanner = fnUntraced(function* (options) {
152313
152301
  yield* pipe(options.preset.cliAgent.commandPlan({
152314
152302
  prompt: promptGen.planPrompt(options),
152315
152303
  prdFilePath: pathService.join(".lalph", "prd.yml"),
152316
- dangerous: options.dangerous,
152317
- extraArgs: options.preset.extraArgs
152304
+ dangerous: options.dangerous
152318
152305
  }), setCwd(worktree.directory), options.preset.withCommandPrefix, exitCode);
152319
152306
  });
152320
152307
 
@@ -152523,7 +152510,7 @@ const commandSource = make$35("source").pipe(withDescription("Select the issue s
152523
152510
 
152524
152511
  //#endregion
152525
152512
  //#region package.json
152526
- var version = "0.3.0";
152513
+ var version = "0.3.2";
152527
152514
 
152528
152515
  //#endregion
152529
152516
  //#region src/commands/projects/ls.ts
@@ -152564,7 +152551,7 @@ const commandProjectsRm = make$35("rm").pipe(withDescription("Remove a project")
152564
152551
  const newProjects = projects.filter((p) => p.id !== project.id);
152565
152552
  yield* Settings.set(allProjects, some$2(newProjects));
152566
152553
  const kvsPath = pathService.join(".lalph", "projects", encodeURIComponent(project.id));
152567
- if (yield* fs.exists(kvsPath)) yield* fs.remove(kvsPath);
152554
+ if (yield* fs.exists(kvsPath)) yield* fs.remove(kvsPath, { recursive: true });
152568
152555
  })), provide(Settings.layer), provide(CurrentIssueSource.layer));
152569
152556
 
152570
152557
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -19,7 +19,6 @@ export const agentPlanner = Effect.fnUntraced(function* (options: {
19
19
  prompt: promptGen.planPrompt(options),
20
20
  prdFilePath: pathService.join(".lalph", "prd.yml"),
21
21
  dangerous: options.dangerous,
22
- extraArgs: options.preset.extraArgs,
23
22
  }),
24
23
  ChildProcess.setCwd(worktree.directory),
25
24
  options.preset.withCommandPrefix,
@@ -15,7 +15,7 @@ export const agentWorker = Effect.fnUntraced(function* (options: {
15
15
  options.preset.cliAgent.command({
16
16
  prompt: options.prompt,
17
17
  prdFilePath: pathService.join(".lalph", "prd.yml"),
18
- extraArgs: [],
18
+ extraArgs: options.preset.extraArgs,
19
19
  }),
20
20
  ChildProcess.setCwd(worktree.directory),
21
21
  options.preset.withCommandPrefix,
package/src/Linear.ts CHANGED
@@ -489,8 +489,8 @@ export const LinearIssueSource = Layer.effect(
489
489
  },
490
490
  Effect.mapError((cause) => new IssueSourceError({ cause })),
491
491
  ),
492
- issueCliAgentPreset: (_issue) =>
493
- Effect.sync(() => Option.fromUndefinedOr(presetMap.get(_issue.id!))),
492
+ issueCliAgentPreset: (issue) =>
493
+ Effect.sync(() => Option.fromUndefinedOr(presetMap.get(issue.id!))),
494
494
  updateCliAgentPreset: Effect.fnUntraced(function* (preset) {
495
495
  const labels = yield* Stream.runCollect(linear.labels).pipe(
496
496
  Effect.mapError((cause) => new IssueSourceError({ cause })),
@@ -23,7 +23,7 @@ export const commandProjectsRm = Command.make("rm").pipe(
23
23
  encodeURIComponent(project.id),
24
24
  )
25
25
  if (yield* fs.exists(kvsPath)) {
26
- yield* fs.remove(kvsPath)
26
+ yield* fs.remove(kvsPath, { recursive: true })
27
27
  }
28
28
  }),
29
29
  ),
@@ -20,7 +20,6 @@ export class CliAgent<const Id extends string> extends Data.Class<{
20
20
  commandPlan: (options: {
21
21
  readonly prompt: string
22
22
  readonly prdFilePath: string
23
- readonly extraArgs: ReadonlyArray<string>
24
23
  readonly dangerous: boolean
25
24
  }) => ChildProcess.Command
26
25
  }> {}
@@ -35,7 +34,7 @@ const opencode = new CliAgent({
35
34
  command: ({ prompt, prdFilePath, extraArgs }) =>
36
35
  ChildProcess.make(
37
36
  "opencode",
38
- ["run", ...extraArgs, "-f", prdFilePath, prompt],
37
+ ["run", prompt, ...extraArgs, "-f", prdFilePath],
39
38
  {
40
39
  extendEnv: true,
41
40
  env: {
@@ -46,11 +45,10 @@ const opencode = new CliAgent({
46
45
  stdin: "inherit",
47
46
  },
48
47
  ),
49
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) =>
48
+ commandPlan: ({ prompt, prdFilePath, dangerous }) =>
50
49
  ChildProcess.make(
51
50
  "opencode",
52
51
  [
53
- ...extraArgs,
54
52
  "--prompt",
55
53
  `@${prdFilePath}
56
54
 
@@ -97,12 +95,11 @@ ${prompt}`,
97
95
  },
98
96
  ),
99
97
  outputTransformer: claudeOutputTransformer,
100
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) =>
98
+ commandPlan: ({ prompt, prdFilePath, dangerous }) =>
101
99
  ChildProcess.make(
102
100
  "claude",
103
101
  [
104
102
  ...(dangerous ? ["--dangerously-skip-permissions"] : []),
105
- ...extraArgs,
106
103
  `@${prdFilePath}
107
104
 
108
105
  ${prompt}`,
@@ -135,11 +132,10 @@ ${prompt}`,
135
132
  stdin: "inherit",
136
133
  },
137
134
  ),
138
- commandPlan: ({ prompt, prdFilePath, extraArgs, dangerous }) =>
135
+ commandPlan: ({ prompt, prdFilePath, dangerous }) =>
139
136
  ChildProcess.make(
140
137
  "codex",
141
138
  [
142
- ...extraArgs,
143
139
  ...(dangerous ? ["--dangerously-bypass-approvals-and-sandbox"] : []),
144
140
  `@${prdFilePath}
145
141