workflow-ai 1.2.1 → 1.3.1

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/CHANGELOG.md CHANGED
@@ -1,49 +1,61 @@
1
- ## [1.2.0] — 2026-04-28
2
-
3
- ### New Features
4
- - **New built-in stage type: `manual-gate`** Adds support for manual approval steps in pipelines. When a stage with `type: manual-gate` is encountered, the runner creates a pending approval file in `.workflow/approvals/{step_id}.json` and enters a polling loop, waiting for an external decision (`approved`/`rejected`).
5
-
6
- **Key capabilities:**
7
- - Deterministic `step_id` generation: `{ticket_id}_{stageId}_{attempt}` (e.g., `QA-12_manual-approve_0`)
8
- - Idempotent file creationpending file is not overwritten on retry/restart
9
- - Configurable polling interval (`poll_interval_ms`, default 2000ms) and optional timeout (`timeout_seconds`)
10
- - Graceful handling of SIGTERM/runner stop (returns `aborted`)
11
- - Immediate return if file already has `approved`/`rejected` status (crash recovery)
12
- - JSON approval file format with full audit trail (`created_at`, `updated_at`, `decided_by`, `comment`, `context_snapshot`)
13
-
14
- **Pipeline configuration example:**
15
- ```yaml
16
- stages:
17
- manual-approve-deploy:
18
- type: manual-gate
19
- poll_interval_ms: 2000
20
- timeout_seconds: 86400
21
- goto:
22
- approved: continue-deploy
23
- rejected: rollback
24
- timeout: notify-stuck
25
- aborted: end
26
- ```
27
-
28
- **Two approval methods (both opt-in):**
29
- 1. **External MCP/client**: tools like `workflow-mcp` can write to approval files programmatically
30
- 2. **Direct file edit**: users can simply edit `.workflow/approvals/{step_id}.json` and change `status` to `approved` or `rejected`
31
-
32
- **Important:** `manual-gate` is **opt-in** — pipelines without such stages work identically to previous versions. No breaking changes.
33
-
34
- ### Changed
35
- - No breaking changes. All existing pipelines without `manual-gate` stages are fully backward compatible.
36
-
37
- ### Fixes
38
- - None
39
-
40
- ### Technical Notes
41
- - Approval files are stored in `<project_root>/.workflow/approvals/`
42
- - Runner validates `manual-gate` stages on startup requires `goto.approved` and `goto.rejected`, validates numeric parameters
43
- - New methods added to `PipelineRunner`: `computeStepId()`, `writeApprovalPending()`, `readApprovalFile()`, `executeManualGate()`
44
-
45
- ### References
46
- - PLAN-009: workflow-ai 1.2 — manual-gate stage and approval files for workflow-mcp Sprint 2 integration
47
- - IMPL-55, IMPL-56, IMPL-57, IMPL-58: Implementation tickets
48
- - QA-35, QA-36, QA-37: Test coverage
49
- - IMPL-51, QA-55 in workflow-mcp: Dependent consumer work
1
+ ## [1.3.0] — 2026-04-30
2
+
3
+ ### Добавлено
4
+ - **Новый тип стейджа: `mark-blocked` и расширение frontmatter** Добавлены поля `auto_blocked_reason`, `auto_blocked_attempts`, `auto_blocked_at` для автоматического отслеживания причин и попыток блокировки тикетов. Стейдж `mark-blocked` позволяет устанавливать эти поля в зависимости от условий бизнес-логики.
5
+ - **Новый тип стейджа: `manual-gate-human`** — Добавлен статус `human_ready` в `pick-next-task.js`. При достижении этого статуса задача ожидает ручного решения оператора перед продолжением выполнения.
6
+ - **Хук одобрения в `move-ticket.js`** — Добавлен approval-hook, проверяющий наличие ожидающих решения одобрений перед перемещением тикета в терминальные состояния.
7
+ - **Расширение START-лога полем `ticket="X"`** Добавлено поле с идентификатором тикета в стартовый лог для улучшенной трассировки и связывания логов с конкретными задачами.
8
+ - **Исправление `approval-pending.mjs` (поле `created_at`)** Исправлено некорректное заполнение поля `created_at` при создании файлов ожидающих решения.
9
+
10
+ > **Примечание:** версия 1.2.0 не была опубликована в npm. При выполнении `npm publish`
11
+ > сработал prepublishOnly/postversion скрипт, автоматически поднявший версию до 1.2.1.
12
+ > Git-тег `v1.2.0` (коммит 179d52b) соответствует состоянию до publish; `v1.2.1` (коммит 83d1b70)
13
+ > фактически опубликованной версии.
14
+
15
+ ### New Features
16
+ - **New built-in stage type: `manual-gate`** — Adds support for manual approval steps in pipelines. When a stage with `type: manual-gate` is encountered, the runner creates a pending approval file in `.workflow/approvals/{step_id}.json` and enters a polling loop, waiting for an external decision (`approved`/`rejected`).
17
+
18
+ **Key capabilities:**
19
+ - Deterministic `step_id` generation: `{ticket_id}_{stageId}_{attempt}` (e.g., `QA-12_manual-approve_0`)
20
+ - Idempotent file creation — pending file is not overwritten on retry/restart
21
+ - Configurable polling interval (`poll_interval_ms`, default 2000ms) and optional timeout (`timeout_seconds`)
22
+ - Graceful handling of SIGTERM/runner stop (returns `aborted`)
23
+ - Immediate return if file already has `approved`/`rejected` status (crash recovery)
24
+ - JSON approval file format with full audit trail (`created_at`, `updated_at`, `decided_by`, `comment`, `context_snapshot`)
25
+
26
+ **Pipeline configuration example:**
27
+ ```yaml
28
+ stages:
29
+ manual-approve-deploy:
30
+ type: manual-gate
31
+ poll_interval_ms: 2000
32
+ timeout_seconds: 86400
33
+ goto:
34
+ approved: continue-deploy
35
+ rejected: rollback
36
+ timeout: notify-stuck
37
+ aborted: end
38
+ ```
39
+
40
+ **Two approval methods (both opt-in):**
41
+ 1. **External MCP/client**: tools like `workflow-mcp` can write to approval files programmatically
42
+ 2. **Direct file edit**: users can simply edit `.workflow/approvals/{step_id}.json` and change `status` to `approved` or `rejected`
43
+
44
+ **Important:** `manual-gate` is **opt-in** — pipelines without such stages work identically to previous versions. No breaking changes.
45
+
46
+ ### Changed
47
+ - No breaking changes. All existing pipelines without `manual-gate` stages are fully backward compatible.
48
+
49
+ ### Fixes
50
+ - Исправлено сохранение временной метки `created_at` в файлах одобрений (approval-pending.mjs)
51
+
52
+ ### Technical Notes
53
+ - Approval files are stored in `<project_root>/.workflow/approvals/`
54
+ - Runner validates `manual-gate` stages on startup — requires `goto.approved` and `goto.rejected`, validates numeric parameters
55
+ - New methods added to `PipelineRunner`: `computeStepId()`, `writeApprovalPending()`, `readApprovalFile()`, `executeManualGate()`
56
+
57
+ ### References
58
+ - PLAN-009: workflow-ai 1.2 — manual-gate stage and approval files for workflow-mcp Sprint 2 integration
59
+ - IMPL-55, IMPL-56, IMPL-57, IMPL-58: Implementation tickets
60
+ - QA-35, QA-36, QA-37: Test coverage
61
+ - IMPL-51, QA-55 in workflow-mcp: Dependent consumer work