lalph 0.1.31 → 0.1.33
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 +16 -6
- package/package.json +1 -1
- package/src/Github/TokenManager.ts +1 -1
- package/src/IssueSource.ts +1 -1
- package/src/Linear/TokenManager.ts +5 -3
- package/src/Prd.ts +2 -2
- package/src/PromptGen.ts +10 -1
package/dist/cli.mjs
CHANGED
|
@@ -133502,8 +133502,9 @@ var AccessToken$1 = class AccessToken$1 extends Class("lalph/Linear/AccessToken"
|
|
|
133502
133502
|
expiresAt: nowUnsafe().pipe(add$1({ seconds: res.expires_in }))
|
|
133503
133503
|
});
|
|
133504
133504
|
}
|
|
133505
|
+
expiresAtEarly = this.expiresAt.pipe(subtract({ minutes: 30 }));
|
|
133505
133506
|
isExpired() {
|
|
133506
|
-
return isPastUnsafe(this.
|
|
133507
|
+
return isPastUnsafe(this.expiresAtEarly);
|
|
133507
133508
|
}
|
|
133508
133509
|
};
|
|
133509
133510
|
const CallbackParams = Struct({ code: String$1 });
|
|
@@ -133528,7 +133529,7 @@ var IssueSourceError = class extends ErrorClass("lalph/IssueSourceError")({
|
|
|
133528
133529
|
cause: Defect
|
|
133529
133530
|
}) {};
|
|
133530
133531
|
const checkForWork = gen(function* () {
|
|
133531
|
-
if (!(yield* (yield* IssueSource).issues).some((issue) => issue.
|
|
133532
|
+
if (!(yield* (yield* IssueSource).issues).some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return yield* new NoMoreWork({});
|
|
133532
133533
|
});
|
|
133533
133534
|
var NoMoreWork = class extends ErrorClass("lalph/Prd/NoMoreWork")({ _tag: tag("NoMoreWork") }) {
|
|
133534
133535
|
message = "No more work to be done!";
|
|
@@ -139829,7 +139830,7 @@ var AccessToken = class AccessToken extends Class("lalph/Github/AccessToken")({
|
|
|
139829
139830
|
});
|
|
139830
139831
|
}
|
|
139831
139832
|
isExpired() {
|
|
139832
|
-
return isPastUnsafe(this.expiresAt.pipe(subtract({ minutes:
|
|
139833
|
+
return isPastUnsafe(this.expiresAt.pipe(subtract({ minutes: 30 })));
|
|
139833
139834
|
}
|
|
139834
139835
|
};
|
|
139835
139836
|
const DeviceCodeResponse = Struct({
|
|
@@ -140174,7 +140175,12 @@ permission.
|
|
|
140174
140175
|
- This session will time out after a certain period, so make sure to record
|
|
140175
140176
|
key information that could speed up future work on the task in the task
|
|
140176
140177
|
description. Record the information **in the moment** as you discover it,
|
|
140177
|
-
do not wait until the end of the task.
|
|
140178
|
+
do not wait until the end of the task. Things to record include:
|
|
140179
|
+
- Important discoveries about the codebase.
|
|
140180
|
+
- Any challenges faced and how you overcame them.
|
|
140181
|
+
- APIs / libraries discovered that were useful.
|
|
140182
|
+
- Links to relevant documentation.
|
|
140183
|
+
- Any other information that could help future work on the task.
|
|
140178
140184
|
5. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
140179
140185
|
6. Create or update the pull request with your progress.
|
|
140180
140186
|
${sourceMeta.githubPrInstructions}
|
|
@@ -140188,6 +140194,10 @@ permission.
|
|
|
140188
140194
|
- Append to the \`description\` field with any notes or important discoveries.
|
|
140189
140195
|
- If you believe the task is complete, update the \`state\` to "in-review".
|
|
140190
140196
|
|
|
140197
|
+
**Remember:** record key information that could speed up future work on the task in
|
|
140198
|
+
the task description **in the moment** as you discover it, do not wait until
|
|
140199
|
+
the end of the task.
|
|
140200
|
+
|
|
140191
140201
|
## Handling blockers
|
|
140192
140202
|
|
|
140193
140203
|
If for any reason you get stuck on a task, mark the task back as "todo" by updating its
|
|
@@ -140358,7 +140368,7 @@ var Prd = class extends Service()("lalph/Prd", { make: gen(function* () {
|
|
|
140358
140368
|
state: "todo"
|
|
140359
140369
|
});
|
|
140360
140370
|
});
|
|
140361
|
-
const mergeConflictInstruction = "
|
|
140371
|
+
const mergeConflictInstruction = "Next step: Rebase PR and resolve merge conflicts.";
|
|
140362
140372
|
return {
|
|
140363
140373
|
path: prdFile,
|
|
140364
140374
|
mergableGithubPrs,
|
|
@@ -140367,7 +140377,7 @@ var Prd = class extends Service()("lalph/Prd", { make: gen(function* () {
|
|
|
140367
140377
|
flagUnmergable: fnUntraced(function* (options) {
|
|
140368
140378
|
const issue = current.find((entry) => entry.id === options.issueId);
|
|
140369
140379
|
if (!issue) return;
|
|
140370
|
-
const nextDescription = issue.description.includes(mergeConflictInstruction) ? issue.description : `${
|
|
140380
|
+
const nextDescription = issue.description.includes(mergeConflictInstruction) ? issue.description : `${mergeConflictInstruction}\n\n${issue.description.trim()}`;
|
|
140371
140381
|
yield* source.updateIssue({
|
|
140372
140382
|
issueId: issue.id,
|
|
140373
140383
|
description: nextDescription,
|
package/package.json
CHANGED
|
@@ -140,7 +140,7 @@ export class AccessToken extends Schema.Class<AccessToken>(
|
|
|
140
140
|
|
|
141
141
|
isExpired(): boolean {
|
|
142
142
|
return DateTime.isPastUnsafe(
|
|
143
|
-
this.expiresAt.pipe(DateTime.subtract({ minutes:
|
|
143
|
+
this.expiresAt.pipe(DateTime.subtract({ minutes: 30 })),
|
|
144
144
|
)
|
|
145
145
|
}
|
|
146
146
|
}
|
package/src/IssueSource.ts
CHANGED
|
@@ -39,7 +39,7 @@ export const checkForWork = Effect.gen(function* () {
|
|
|
39
39
|
const source = yield* IssueSource
|
|
40
40
|
const issues = yield* source.issues
|
|
41
41
|
const hasIncomplete = issues.some(
|
|
42
|
-
(issue) => issue.
|
|
42
|
+
(issue) => issue.state === "todo" && issue.blockedBy.length === 0,
|
|
43
43
|
)
|
|
44
44
|
if (!hasIncomplete) {
|
|
45
45
|
return yield* new NoMoreWork({})
|
|
@@ -170,10 +170,12 @@ export class AccessToken extends Schema.Class<AccessToken>(
|
|
|
170
170
|
})
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
readonly expiresAtEarly = this.expiresAt.pipe(
|
|
174
|
+
DateTime.subtract({ minutes: 30 }),
|
|
175
|
+
)
|
|
176
|
+
|
|
173
177
|
isExpired(): boolean {
|
|
174
|
-
return DateTime.isPastUnsafe(
|
|
175
|
-
this.expiresAt.pipe(DateTime.subtract({ minutes: 5 })),
|
|
176
|
-
)
|
|
178
|
+
return DateTime.isPastUnsafe(this.expiresAtEarly)
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
|
package/src/Prd.ts
CHANGED
|
@@ -141,7 +141,7 @@ export class Prd extends ServiceMap.Service<Prd>()("lalph/Prd", {
|
|
|
141
141
|
})
|
|
142
142
|
|
|
143
143
|
const mergeConflictInstruction =
|
|
144
|
-
"
|
|
144
|
+
"Next step: Rebase PR and resolve merge conflicts."
|
|
145
145
|
|
|
146
146
|
const flagUnmergable = Effect.fnUntraced(function* (options: {
|
|
147
147
|
readonly issueId: string
|
|
@@ -154,7 +154,7 @@ export class Prd extends ServiceMap.Service<Prd>()("lalph/Prd", {
|
|
|
154
154
|
)
|
|
155
155
|
const nextDescription = hasInstruction
|
|
156
156
|
? issue.description
|
|
157
|
-
: `${
|
|
157
|
+
: `${mergeConflictInstruction}\n\n${issue.description.trim()}`
|
|
158
158
|
|
|
159
159
|
yield* source.updateIssue({
|
|
160
160
|
issueId: issue.id!,
|
package/src/PromptGen.ts
CHANGED
|
@@ -101,7 +101,12 @@ permission.
|
|
|
101
101
|
- This session will time out after a certain period, so make sure to record
|
|
102
102
|
key information that could speed up future work on the task in the task
|
|
103
103
|
description. Record the information **in the moment** as you discover it,
|
|
104
|
-
do not wait until the end of the task.
|
|
104
|
+
do not wait until the end of the task. Things to record include:
|
|
105
|
+
- Important discoveries about the codebase.
|
|
106
|
+
- Any challenges faced and how you overcame them.
|
|
107
|
+
- APIs / libraries discovered that were useful.
|
|
108
|
+
- Links to relevant documentation.
|
|
109
|
+
- Any other information that could help future work on the task.
|
|
105
110
|
5. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
106
111
|
6. Create or update the pull request with your progress.
|
|
107
112
|
${sourceMeta.githubPrInstructions}
|
|
@@ -115,6 +120,10 @@ permission.
|
|
|
115
120
|
- Append to the \`description\` field with any notes or important discoveries.
|
|
116
121
|
- If you believe the task is complete, update the \`state\` to "in-review".
|
|
117
122
|
|
|
123
|
+
**Remember:** record key information that could speed up future work on the task in
|
|
124
|
+
the task description **in the moment** as you discover it, do not wait until
|
|
125
|
+
the end of the task.
|
|
126
|
+
|
|
118
127
|
## Handling blockers
|
|
119
128
|
|
|
120
129
|
If for any reason you get stuck on a task, mark the task back as "todo" by updating its
|