lalph 0.3.8 → 0.3.9
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 +9 -8
- package/package.json +1 -1
- package/src/Agents/chooser.ts +1 -3
- package/src/PromptGen.ts +4 -4
- package/src/commands/root.ts +5 -3
package/dist/cli.mjs
CHANGED
|
@@ -150957,7 +150957,8 @@ To remove a task, simply delete the item from the prd.yml file.
|
|
|
150957
150957
|
\`\`\`json
|
|
150958
150958
|
${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
|
|
150959
150959
|
\`\`\``;
|
|
150960
|
-
const promptChoose = (options) => `Your job is to choose the next task to work on from the prd.yml file
|
|
150960
|
+
const promptChoose = (options) => `Your job is to choose the next task to work on from the prd.yml file and save it in a task.json file.
|
|
150961
|
+
**DO NOT** implement the task yet.
|
|
150961
150962
|
|
|
150962
150963
|
The following instructions should be done without interaction or asking for permission.
|
|
150963
150964
|
|
|
@@ -150970,7 +150971,7 @@ The following instructions should be done without interaction or asking for perm
|
|
|
150970
150971
|
- Only include "open" PRs that are not yet merged.
|
|
150971
150972
|
- The pull request will contain the task id in the title or description.` : ""}
|
|
150972
150973
|
- Once you have chosen a task, save its information in a "task.json" file alongside
|
|
150973
|
-
|
|
150974
|
+
the prd.yml file. Use the following format:
|
|
150974
150975
|
|
|
150975
150976
|
\`\`\`json
|
|
150976
150977
|
{
|
|
@@ -150981,8 +150982,7 @@ The following instructions should be done without interaction or asking for perm
|
|
|
150981
150982
|
|
|
150982
150983
|
Set \`githubPrNumber\` to the PR number if one exists, otherwise use \`null\`.
|
|
150983
150984
|
` : "\n\nLeave `githubPrNumber` as null."}
|
|
150984
|
-
|
|
150985
|
-
${prdNotes()}`;
|
|
150985
|
+
`;
|
|
150986
150986
|
const keyInformation = (options) => `## Important: Adding new tasks
|
|
150987
150987
|
|
|
150988
150988
|
**If at any point** you discover something that needs fixing, or another task
|
|
@@ -151824,7 +151824,7 @@ const agentChooser = fnUntraced(function* (options) {
|
|
|
151824
151824
|
}), raceFirst(taskJsonCreated));
|
|
151825
151825
|
return yield* pipe(fs.readFileString(pathService.join(worktree.directory, ".lalph", "task.json")), flatMap$2(decodeEffect(ChosenTask)), mapError$2((_) => new ChosenTaskNotFound()), flatMap$2(fnUntraced(function* (task) {
|
|
151826
151826
|
const prdTask = yield* prd.findById(task.id);
|
|
151827
|
-
if (prdTask
|
|
151827
|
+
if (prdTask) return {
|
|
151828
151828
|
...task,
|
|
151829
151829
|
prd: prdTask
|
|
151830
151830
|
};
|
|
@@ -151922,13 +151922,13 @@ const run = fnUntraced(function* (options) {
|
|
|
151922
151922
|
preset
|
|
151923
151923
|
}).pipe(withSpan("Main.agentChooser"));
|
|
151924
151924
|
taskId = chosenTask.id;
|
|
151925
|
-
yield* prd.setChosenIssueId(taskId);
|
|
151926
|
-
yield* prd.setAutoMerge(chosenTask.prd.autoMerge);
|
|
151927
151925
|
yield* source.updateIssue({
|
|
151928
151926
|
projectId,
|
|
151929
151927
|
issueId: taskId,
|
|
151930
151928
|
state: "in-progress"
|
|
151931
151929
|
});
|
|
151930
|
+
yield* prd.setChosenIssueId(taskId);
|
|
151931
|
+
yield* prd.setAutoMerge(chosenTask.prd.autoMerge);
|
|
151932
151932
|
yield* source.ensureInProgress(projectId, taskId).pipe(timeoutOrElse({
|
|
151933
151933
|
duration: "1 minute",
|
|
151934
151934
|
onTimeout: () => fail$4(new RunnerStalled())
|
|
@@ -152065,6 +152065,7 @@ const commandRoot = make$35("lalph", {
|
|
|
152065
152065
|
const watchTaskState = fnUntraced(function* (options) {
|
|
152066
152066
|
const registry = yield* AtomRegistry;
|
|
152067
152067
|
const projectId = yield* CurrentProjectId;
|
|
152068
|
+
yield* sleep(seconds(10));
|
|
152068
152069
|
return yield* toStreamResult(registry, currentIssuesAtom(projectId)).pipe(runForEach((issues) => {
|
|
152069
152070
|
const issue = issues.find((entry) => entry.id === options.issueId);
|
|
152070
152071
|
if (!issue) return fail$4(new TaskStateChanged({
|
|
@@ -152294,7 +152295,7 @@ const commandSource = make$35("source").pipe(withDescription("Select the issue s
|
|
|
152294
152295
|
|
|
152295
152296
|
//#endregion
|
|
152296
152297
|
//#region package.json
|
|
152297
|
-
var version = "0.3.
|
|
152298
|
+
var version = "0.3.9";
|
|
152298
152299
|
|
|
152299
152300
|
//#endregion
|
|
152300
152301
|
//#region src/commands/projects/ls.ts
|
package/package.json
CHANGED
package/src/Agents/chooser.ts
CHANGED
|
@@ -52,9 +52,7 @@ export const agentChooser = Effect.fnUntraced(function* (options: {
|
|
|
52
52
|
Effect.flatMap(
|
|
53
53
|
Effect.fnUntraced(function* (task) {
|
|
54
54
|
const prdTask = yield* prd.findById(task.id)
|
|
55
|
-
if (prdTask
|
|
56
|
-
return { ...task, prd: prdTask }
|
|
57
|
-
}
|
|
55
|
+
if (prdTask) return { ...task, prd: prdTask }
|
|
58
56
|
return yield* new ChosenTaskNotFound()
|
|
59
57
|
}),
|
|
60
58
|
),
|
package/src/PromptGen.ts
CHANGED
|
@@ -74,7 +74,8 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
|
|
|
74
74
|
|
|
75
75
|
const promptChoose = (options: {
|
|
76
76
|
readonly gitFlow: GitFlow["Service"]
|
|
77
|
-
}) => `Your job is to choose the next task to work on from the prd.yml file
|
|
77
|
+
}) => `Your job is to choose the next task to work on from the prd.yml file and save it in a task.json file.
|
|
78
|
+
**DO NOT** implement the task yet.
|
|
78
79
|
|
|
79
80
|
The following instructions should be done without interaction or asking for permission.
|
|
80
81
|
|
|
@@ -91,7 +92,7 @@ The following instructions should be done without interaction or asking for perm
|
|
|
91
92
|
: ""
|
|
92
93
|
}
|
|
93
94
|
- Once you have chosen a task, save its information in a "task.json" file alongside
|
|
94
|
-
|
|
95
|
+
the prd.yml file. Use the following format:
|
|
95
96
|
|
|
96
97
|
\`\`\`json
|
|
97
98
|
{
|
|
@@ -106,8 +107,7 @@ Set \`githubPrNumber\` to the PR number if one exists, otherwise use \`null\`.
|
|
|
106
107
|
`
|
|
107
108
|
: "\n\nLeave `githubPrNumber` as null."
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
-
${prdNotes()}`
|
|
110
|
+
`
|
|
111
111
|
|
|
112
112
|
const keyInformation = (options: {
|
|
113
113
|
readonly specsDirectory: string
|
package/src/commands/root.ts
CHANGED
|
@@ -111,14 +111,14 @@ const run = Effect.fnUntraced(
|
|
|
111
111
|
}).pipe(Effect.withSpan("Main.agentChooser"))
|
|
112
112
|
|
|
113
113
|
taskId = chosenTask.id
|
|
114
|
-
yield* prd.setChosenIssueId(taskId)
|
|
115
|
-
yield* prd.setAutoMerge(chosenTask.prd.autoMerge)
|
|
116
|
-
|
|
117
114
|
yield* source.updateIssue({
|
|
118
115
|
projectId,
|
|
119
116
|
issueId: taskId,
|
|
120
117
|
state: "in-progress",
|
|
121
118
|
})
|
|
119
|
+
yield* prd.setChosenIssueId(taskId)
|
|
120
|
+
yield* prd.setAutoMerge(chosenTask.prd.autoMerge)
|
|
121
|
+
|
|
122
122
|
yield* source.ensureInProgress(projectId, taskId).pipe(
|
|
123
123
|
Effect.timeoutOrElse({
|
|
124
124
|
duration: "1 minute",
|
|
@@ -419,6 +419,8 @@ const watchTaskState = Effect.fnUntraced(function* (options: {
|
|
|
419
419
|
const registry = yield* AtomRegistry.AtomRegistry
|
|
420
420
|
const projectId = yield* CurrentProjectId
|
|
421
421
|
|
|
422
|
+
yield* Effect.sleep(Duration.seconds(10))
|
|
423
|
+
|
|
422
424
|
return yield* AtomRegistry.toStreamResult(
|
|
423
425
|
registry,
|
|
424
426
|
currentIssuesAtom(projectId),
|