@cleocode/core 2026.3.67 → 2026.3.68
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/index.js +20 -16
- package/dist/index.js.map +2 -2
- package/dist/tasks/add.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/tasks/add.ts +25 -20
package/dist/index.js
CHANGED
|
@@ -23291,9 +23291,11 @@ async function addTask(options, cwd, accessor) {
|
|
|
23291
23291
|
"Title and description must be different (anti-hallucination rule)"
|
|
23292
23292
|
);
|
|
23293
23293
|
}
|
|
23294
|
-
|
|
23294
|
+
if (!options.dryRun) {
|
|
23295
|
+
await requireActiveSession("tasks.add", cwd);
|
|
23296
|
+
}
|
|
23295
23297
|
const parentId = options.parentId ?? null;
|
|
23296
|
-
if (!parentId && options.type !== "epic") {
|
|
23298
|
+
if (!options.dryRun && !parentId && options.type !== "epic") {
|
|
23297
23299
|
const lifecycleMode = await getLifecycleMode(cwd);
|
|
23298
23300
|
if (lifecycleMode === "strict") {
|
|
23299
23301
|
throw new CleoError(
|
|
@@ -23313,21 +23315,23 @@ async function addTask(options, cwd, accessor) {
|
|
|
23313
23315
|
validateStatus(status);
|
|
23314
23316
|
validateSize(size);
|
|
23315
23317
|
if (options.labels?.length) validateLabels(options.labels);
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
if (!acValidation.valid) {
|
|
23322
|
-
throw new CleoError(acValidation.exitCode ?? 6 /* VALIDATION_ERROR */, acValidation.error, {
|
|
23323
|
-
fix: acValidation.fix
|
|
23318
|
+
if (!options.dryRun) {
|
|
23319
|
+
const enforcement = await createAcceptanceEnforcement(cwd);
|
|
23320
|
+
const acValidation = enforcement.validateCreation({
|
|
23321
|
+
acceptance: options.acceptance,
|
|
23322
|
+
priority
|
|
23324
23323
|
});
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
)
|
|
23324
|
+
if (!acValidation.valid) {
|
|
23325
|
+
throw new CleoError(acValidation.exitCode ?? 6 /* VALIDATION_ERROR */, acValidation.error, {
|
|
23326
|
+
fix: acValidation.fix
|
|
23327
|
+
});
|
|
23328
|
+
}
|
|
23329
|
+
if (options.type === "epic") {
|
|
23330
|
+
await validateEpicCreation(
|
|
23331
|
+
{ acceptance: options.acceptance, description: options.description },
|
|
23332
|
+
cwd
|
|
23333
|
+
);
|
|
23334
|
+
}
|
|
23331
23335
|
}
|
|
23332
23336
|
if (options.depends?.length) {
|
|
23333
23337
|
for (const depId of options.depends) {
|