@clipboard-health/groundcrew 4.34.2 → 4.34.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/todo-txt/source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/todo-txt/source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA8VxD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,cAAc,GACtB,UAAU,CA2KZ"}
|
|
@@ -3,6 +3,7 @@ import { appendFileSync, mkdirSync, readFileSync, statSync, writeFileSync } from
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { AGENT_ANY } from "../../config.js";
|
|
5
5
|
import { toCanonicalId, } from "../../taskSource.js";
|
|
6
|
+
import { formatKnownRepositories } from "../../repositoryValidation.js";
|
|
6
7
|
import { readEnvironmentVariable } from "../../util.js";
|
|
7
8
|
import { isActiveForFetch, normalizeToIssue } from "./normalizer.js";
|
|
8
9
|
import { DATE_RE, getMetadataFirst, parseAllLines } from "./parser.js";
|
|
@@ -161,6 +162,18 @@ function assertNewId(id, parsedAll) {
|
|
|
161
162
|
throw new Error(`todo-txt: task id "${id}" already exists`);
|
|
162
163
|
}
|
|
163
164
|
}
|
|
165
|
+
function assertCreateRepository(arguments_) {
|
|
166
|
+
const { defaultRepository, input, knownRepositories, sourceName } = arguments_;
|
|
167
|
+
const repository = input.repository ?? defaultRepository;
|
|
168
|
+
/* v8 ignore else @preserve -- both missing and resolved repository paths are covered; full-suite V8 coverage remaps the synthetic else inconsistently. */
|
|
169
|
+
if (repository === undefined) {
|
|
170
|
+
throw new Error(`todo-txt: --repo is required unless source "${sourceName}" configures defaultRepository. Known repositories: ${formatKnownRepositories(knownRepositories)}`);
|
|
171
|
+
}
|
|
172
|
+
/* v8 ignore else @preserve -- both known and unknown repository paths are covered; full-suite V8 coverage remaps the synthetic else inconsistently. */
|
|
173
|
+
if (!knownRepositories.includes(repository)) {
|
|
174
|
+
throw new Error(`todo-txt: repository "${repository}" is not in workspace.knownRepositories: ${formatKnownRepositories(knownRepositories)}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
164
177
|
function buildTodoLine(id, input) {
|
|
165
178
|
const title = input.title.trim();
|
|
166
179
|
/* v8 ignore else @preserve -- no explicit else branch; full-suite V8 coverage remaps the synthetic else inconsistently. */
|
|
@@ -172,12 +185,14 @@ function buildTodoLine(id, input) {
|
|
|
172
185
|
throw new Error("todo-txt: title must be a single line");
|
|
173
186
|
}
|
|
174
187
|
const tokens = [];
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
188
|
+
/* v8 ignore else @preserve -- both priority-present and priority-absent creation paths are covered; full-suite V8 coverage remaps the synthetic else inconsistently. */
|
|
189
|
+
if (input.priority !== undefined) {
|
|
190
|
+
/* v8 ignore else @preserve -- no explicit else branch; full-suite V8 coverage remaps the synthetic else inconsistently. */
|
|
191
|
+
if (!/^[A-Z]$/.test(input.priority)) {
|
|
192
|
+
throw new Error("todo-txt: priority must be a single uppercase letter");
|
|
193
|
+
}
|
|
194
|
+
tokens.push(`(${input.priority})`);
|
|
179
195
|
}
|
|
180
|
-
tokens.push(`(${priority})`);
|
|
181
196
|
tokens.push(title);
|
|
182
197
|
for (const rawProject of input.projects) {
|
|
183
198
|
const project = normalizeProject(rawProject);
|
|
@@ -369,6 +384,12 @@ export function createTodoTxtTaskSource(config, context) {
|
|
|
369
384
|
const id = input.id ?? nextGeneratedId(config, parsedAll);
|
|
370
385
|
assertCreateId(id);
|
|
371
386
|
assertNewId(id, parsedAll);
|
|
387
|
+
assertCreateRepository({
|
|
388
|
+
defaultRepository: config.defaultRepository,
|
|
389
|
+
input,
|
|
390
|
+
knownRepositories: context.globalConfig.workspace.knownRepositories,
|
|
391
|
+
sourceName,
|
|
392
|
+
});
|
|
372
393
|
const promptPath = path.join(tasksDir, `${id}.md`);
|
|
373
394
|
const promptContent = promptContentFor(input);
|
|
374
395
|
const line = buildTodoLine(id, input);
|
package/docs/commands.md
CHANGED
|
@@ -18,7 +18,7 @@ crew task get GC-20260608-001 --source todo
|
|
|
18
18
|
crew task get todo:GC-20260608-001 --prompt
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
`crew task create "Short title" --source <source> [--agent <agent>]` creates a task in a source that supports creation. When `--agent` is omitted, it defaults to `any`. Todo.txt creation
|
|
21
|
+
`crew task create "Short title" --source <source> [--agent <agent>]` creates a task in a source that supports creation. When `--agent` is omitted, it defaults to `any`. Todo.txt creation requires `--repo <repo>` unless the source configures `defaultRepository`, appends the todo line, writes `.tasks/<id>.md`, and leaves `status:todo` as the final meaningful token, so no separate ready command is required. Pass `--priority <letter>` to add a todo.txt priority marker. Hand-written todo-txt lines can omit `.tasks/<id>.md` when the line has a non-empty title; that title becomes the prompt text.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
crew task create "Fix cancellation retry race" \
|
package/docs/task-sources.md
CHANGED
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
};
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Creating a todo task appends a line with `status:todo` as the final meaningful token and writes the prompt to `.tasks/<id>.md`.
|
|
81
|
+
Creating a todo task appends a line with `status:todo` as the final meaningful token and writes the prompt to `.tasks/<id>.md`. Pass `--repo <repo>` unless the source configures `defaultRepository`. Pass `--priority <letter>` to add a todo.txt priority marker. If `--agent` is omitted, the task uses `agent:any`.
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
crew task create "Fix cancellation retry race" \
|
|
@@ -91,7 +91,7 @@ crew task create "Fix cancellation retry race" \
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
```txt
|
|
94
|
-
|
|
94
|
+
Fix cancellation retry race +marketplace @backend id:GC-20260608-001 repo:ClipboardHealth/api agent:codex status:todo
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
For hand-written todo lines, a non-empty title is enough prompt text when `.tasks/<id>.md` is absent. Omit `agent:` to default to `agent:any`:
|
package/package.json
CHANGED