@calmo/task-runner 3.8.4 → 4.1.0
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/.agent/workflows/openspec-apply.md +20 -0
- package/.agent/workflows/openspec-archive.md +24 -0
- package/.agent/workflows/openspec-proposal.md +25 -0
- package/.github/workflows/codeql.yml +1 -1
- package/.github/workflows/release-please.yml +46 -0
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/.jules/nexus.md +5 -0
- package/.release-please-manifest.json +3 -0
- package/AGENTS.md +1 -4
- package/CHANGELOG.md +123 -0
- package/CODE_OF_CONDUCT.md +131 -0
- package/CONTRIBUTING.md +89 -0
- package/README.md +1 -1
- package/dist/TaskResult.d.ts +9 -0
- package/dist/TaskRunner.js +47 -34
- package/dist/TaskRunner.js.map +1 -1
- package/dist/TaskStateManager.d.ts +22 -6
- package/dist/TaskStateManager.js +101 -45
- package/dist/TaskStateManager.js.map +1 -1
- package/dist/WorkflowExecutor.js +17 -10
- package/dist/WorkflowExecutor.js.map +1 -1
- package/dist/strategies/DryRunExecutionStrategy.d.ts +1 -1
- package/dist/strategies/DryRunExecutionStrategy.js +2 -4
- package/dist/strategies/DryRunExecutionStrategy.js.map +1 -1
- package/dist/utils/PriorityQueue.d.ts +13 -0
- package/dist/utils/PriorityQueue.js +82 -0
- package/dist/utils/PriorityQueue.js.map +1 -0
- package/openspec/changes/add-resource-concurrency/proposal.md +18 -0
- package/openspec/changes/add-resource-concurrency/specs/task-runner/spec.md +25 -0
- package/openspec/changes/add-resource-concurrency/tasks.md +9 -0
- package/openspec/changes/archive/2026-01-18-add-concurrency-control/specs/task-runner/spec.md +26 -0
- package/openspec/changes/archive/2026-01-18-add-external-task-cancellation/specs/task-runner/spec.md +63 -0
- package/openspec/changes/archive/2026-01-18-add-integration-tests/specs/task-runner/spec.md +22 -0
- package/openspec/changes/archive/2026-01-18-add-task-retry-policy/specs/task-runner/spec.md +40 -0
- package/openspec/changes/archive/2026-01-18-add-workflow-preview/specs/task-runner/spec.md +25 -0
- package/openspec/changes/archive/2026-01-18-refactor-core-architecture/specs/task-runner/spec.md +31 -0
- package/openspec/changes/archive/2026-01-22-adopt-release-pr/design.md +40 -0
- package/openspec/changes/archive/2026-01-22-adopt-release-pr/proposal.md +47 -0
- package/openspec/changes/archive/2026-01-22-adopt-release-pr/specs/release-pr/spec.md +34 -0
- package/openspec/changes/archive/2026-01-22-adopt-release-pr/tasks.md +14 -0
- package/openspec/changes/{feat-task-metrics → archive/2026-01-22-feat-task-metrics}/proposal.md +1 -1
- package/openspec/changes/archive/2026-01-22-feat-task-metrics/specs/001-generic-task-runner/spec.md +13 -0
- package/openspec/changes/archive/2026-01-22-feat-task-metrics/tasks.md +6 -0
- package/openspec/changes/feat-conditional-retries/proposal.md +18 -0
- package/openspec/changes/feat-conditional-retries/specs/task-runner/spec.md +23 -0
- package/openspec/changes/feat-conditional-retries/tasks.md +37 -0
- package/openspec/changes/feat-per-task-timeout/specs/task-runner/spec.md +34 -0
- package/openspec/changes/feat-state-persistence/specs/task-runner/spec.md +47 -0
- package/openspec/specs/release-pr/spec.md +31 -0
- package/openspec/specs/task-runner/spec.md +174 -0
- package/package.json +11 -20
- package/release-please-config.json +9 -0
- package/src/TaskResult.ts +9 -0
- package/src/TaskRunner.ts +55 -36
- package/src/TaskStateManager.ts +114 -46
- package/src/WorkflowExecutor.ts +21 -11
- package/src/strategies/DryRunExecutionStrategy.ts +2 -3
- package/src/utils/PriorityQueue.ts +101 -0
- package/.gemini/commands/speckit.analyze.toml +0 -188
- package/.gemini/commands/speckit.checklist.toml +0 -298
- package/.gemini/commands/speckit.clarify.toml +0 -185
- package/.gemini/commands/speckit.constitution.toml +0 -86
- package/.gemini/commands/speckit.implement.toml +0 -139
- package/.gemini/commands/speckit.plan.toml +0 -93
- package/.gemini/commands/speckit.specify.toml +0 -262
- package/.gemini/commands/speckit.tasks.toml +0 -141
- package/.gemini/commands/speckit.taskstoissues.toml +0 -34
- package/.github/workflows/release.yml +0 -46
- package/.releaserc.json +0 -27
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/coverage-final.json +0 -15
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -146
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/EventBus.ts.html +0 -379
- package/coverage/lcov-report/src/ExecutionConstants.ts.html +0 -121
- package/coverage/lcov-report/src/TaskGraphValidationError.ts.html +0 -130
- package/coverage/lcov-report/src/TaskGraphValidator.ts.html +0 -643
- package/coverage/lcov-report/src/TaskRunner.ts.html +0 -706
- package/coverage/lcov-report/src/TaskRunnerBuilder.ts.html +0 -337
- package/coverage/lcov-report/src/TaskRunnerExecutionConfig.ts.html +0 -154
- package/coverage/lcov-report/src/TaskStateManager.ts.html +0 -529
- package/coverage/lcov-report/src/WorkflowExecutor.ts.html +0 -712
- package/coverage/lcov-report/src/contracts/ErrorTypes.ts.html +0 -103
- package/coverage/lcov-report/src/contracts/RunnerEvents.ts.html +0 -217
- package/coverage/lcov-report/src/contracts/index.html +0 -131
- package/coverage/lcov-report/src/index.html +0 -236
- package/coverage/lcov-report/src/strategies/DryRunExecutionStrategy.ts.html +0 -178
- package/coverage/lcov-report/src/strategies/RetryingExecutionStrategy.ts.html +0 -373
- package/coverage/lcov-report/src/strategies/StandardExecutionStrategy.ts.html +0 -190
- package/coverage/lcov-report/src/strategies/index.html +0 -146
- package/coverage/lcov.info +0 -671
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -210
- package/coverage/src/EventBus.ts.html +0 -379
- package/coverage/src/ExecutionConstants.ts.html +0 -121
- package/coverage/src/TaskGraphValidationError.ts.html +0 -130
- package/coverage/src/TaskGraphValidator.ts.html +0 -643
- package/coverage/src/TaskRunner.ts.html +0 -706
- package/coverage/src/TaskRunnerBuilder.ts.html +0 -337
- package/coverage/src/TaskRunnerExecutionConfig.ts.html +0 -154
- package/coverage/src/TaskStateManager.ts.html +0 -529
- package/coverage/src/WorkflowExecutor.ts.html +0 -712
- package/coverage/src/contracts/ErrorTypes.ts.html +0 -103
- package/coverage/src/contracts/RunnerEvents.ts.html +0 -217
- package/coverage/src/contracts/index.html +0 -131
- package/coverage/src/index.html +0 -236
- package/coverage/src/strategies/DryRunExecutionStrategy.ts.html +0 -178
- package/coverage/src/strategies/RetryingExecutionStrategy.ts.html +0 -373
- package/coverage/src/strategies/StandardExecutionStrategy.ts.html +0 -190
- package/coverage/src/strategies/index.html +0 -146
- package/openspec/changes/feat-task-metrics/tasks.md +0 -6
- package/test-report.xml +0 -299
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implement an approved OpenSpec change and keep tasks in sync.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
|
|
10
|
+
**Steps**
|
|
11
|
+
Track these steps as TODOs and complete them one by one.
|
|
12
|
+
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
|
|
13
|
+
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
|
|
14
|
+
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
|
|
15
|
+
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
|
|
16
|
+
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
|
|
17
|
+
|
|
18
|
+
**Reference**
|
|
19
|
+
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
|
|
20
|
+
<!-- OPENSPEC:END -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Archive a deployed OpenSpec change and update specs.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
|
|
10
|
+
**Steps**
|
|
11
|
+
1. Determine the change ID to archive:
|
|
12
|
+
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
|
|
13
|
+
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
|
|
14
|
+
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
|
|
15
|
+
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
|
|
16
|
+
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
|
|
17
|
+
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
|
|
18
|
+
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
|
|
19
|
+
5. Validate with `openspec validate --strict --no-interactive` and inspect with `openspec show <id>` if anything looks off.
|
|
20
|
+
|
|
21
|
+
**Reference**
|
|
22
|
+
- Use `openspec list` to confirm change IDs before archiving.
|
|
23
|
+
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
|
|
24
|
+
<!-- OPENSPEC:END -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scaffold a new OpenSpec change and validate strictly.
|
|
3
|
+
---
|
|
4
|
+
<!-- OPENSPEC:START -->
|
|
5
|
+
**Guardrails**
|
|
6
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
7
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
8
|
+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
|
|
9
|
+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
|
|
10
|
+
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.
|
|
11
|
+
|
|
12
|
+
**Steps**
|
|
13
|
+
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
|
|
14
|
+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
|
|
15
|
+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
|
|
16
|
+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
|
|
17
|
+
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
|
|
18
|
+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
|
|
19
|
+
7. Validate with `openspec validate <id> --strict --no-interactive` and resolve every issue before sharing the proposal.
|
|
20
|
+
|
|
21
|
+
**Reference**
|
|
22
|
+
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
|
|
23
|
+
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
|
|
24
|
+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
|
|
25
|
+
<!-- OPENSPEC:END -->
|
|
@@ -57,7 +57,7 @@ jobs:
|
|
|
57
57
|
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
58
58
|
steps:
|
|
59
59
|
- name: Checkout repository
|
|
60
|
-
uses: actions/checkout@
|
|
60
|
+
uses: actions/checkout@v6
|
|
61
61
|
|
|
62
62
|
# Add any setup steps before running the `github/codeql-action/init` action.
|
|
63
63
|
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: release-please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: googleapis/release-please-action@v4
|
|
18
|
+
id: release
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
target-branch: main
|
|
22
|
+
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
25
|
+
|
|
26
|
+
- name: Setup pnpm
|
|
27
|
+
uses: pnpm/action-setup@v4
|
|
28
|
+
with:
|
|
29
|
+
version: 10.28.0
|
|
30
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
31
|
+
|
|
32
|
+
- uses: actions/setup-node@v6
|
|
33
|
+
with:
|
|
34
|
+
node-version: "lts/*"
|
|
35
|
+
registry-url: "https://registry.npmjs.org"
|
|
36
|
+
cache: "pnpm"
|
|
37
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
38
|
+
|
|
39
|
+
- run: pnpm install --frozen-lockfile
|
|
40
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
41
|
+
|
|
42
|
+
- run: pnpm build
|
|
43
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
44
|
+
|
|
45
|
+
- run: pnpm publish --no-git-checks
|
|
46
|
+
if: ${{ steps.release.outputs.release_created }}
|
package/.husky/commit-msg
CHANGED
|
File without changes
|
package/.husky/pre-commit
CHANGED
|
File without changes
|
package/.jules/nexus.md
CHANGED
|
@@ -14,3 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
**Insight:** Users' optimization efforts are blind without granular metrics. Users often don't know *which* task is slow, only that the workflow is slow.
|
|
16
16
|
**Action:** Always include telemetry requirements (like start/end times and duration) in execution engine specs to enable data-driven optimization.
|
|
17
|
+
|
|
18
|
+
## 2026-01-20 - The "All or Nothing" Retry Trap
|
|
19
|
+
|
|
20
|
+
**Insight:** Blindly retrying failing tasks is a "Product Anti-pattern". Retrying a `SyntaxError` or invalid user input 3 times (with exponential backoff!) is annoying and wasteful.
|
|
21
|
+
**Action:** We must distinguish between "Transient" (network, resource lock) and "Permanent" (logic, validation) failures. Exposing a `shouldRetry` predicate gives the user control without complicating the core runner logic.
|
package/AGENTS.md
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<!-- OPENSPEC:START -->
|
|
2
|
-
|
|
3
2
|
# OpenSpec Instructions
|
|
4
3
|
|
|
5
4
|
These instructions are for AI assistants working in this project.
|
|
6
5
|
|
|
7
6
|
Always open `@/openspec/AGENTS.md` when the request:
|
|
8
|
-
|
|
9
7
|
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
10
8
|
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
11
9
|
- Sounds ambiguous and you need the authoritative spec before coding
|
|
12
10
|
|
|
13
11
|
Use `@/openspec/AGENTS.md` to learn:
|
|
14
|
-
|
|
15
12
|
- How to create and apply change proposals
|
|
16
13
|
- Spec format and conventions
|
|
17
14
|
- Project structure and guidelines
|
|
18
|
-
- When creating specs or docs, add a prefix "docs:" to your commit to avoid triggering a new module version
|
|
19
15
|
|
|
20
16
|
Keep this managed block so 'openspec update' can refresh the instructions.
|
|
21
17
|
|
|
@@ -29,6 +25,7 @@ Keep this managed block so 'openspec update' can refresh the instructions.
|
|
|
29
25
|
- Its forbidden to have coverage drop below 100%, thats non negotiable.
|
|
30
26
|
- **Strict Null Safety:** Do not use `??` or optional chaining `?.` when you can guarantee existence via prior validation. Use non-null assertions `!` only when the invariant is locally provable or enforced by a validator.
|
|
31
27
|
- **Dead Code Elimination:** Avoid `v8 ignore` comments. If code is unreachable, restructure the logic to prove it is unreachable to the compiler, or remove the branch if the invariant is guaranteed.
|
|
28
|
+
- **Signal Combination:** Prefer `AbortSignal.any()` over manual event listeners when combining multiple `AbortSignal`s to simplify logic and avoid memory leaks.
|
|
32
29
|
|
|
33
30
|
## Operational Protocols
|
|
34
31
|
|
package/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,129 @@
|
|
|
18
18
|
* refactor: Refactor TaskRunner to reduce cognitive complexity (#89) ([95c67d9](https://github.com/thalesraymond/task-runner/commit/95c67d9)), closes [#89](https://github.com/thalesraymond/task-runner/issues/89)
|
|
19
19
|
* Refactor TaskGraphValidator to address SonarCloud issues (#88) ([77c1538](https://github.com/thalesraymond/task-runner/commit/77c1538)), closes [#88](https://github.com/thalesraymond/task-runner/issues/88)
|
|
20
20
|
|
|
21
|
+
## [4.1.0](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.4...task-runner-v4.1.0) (2026-01-24)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* 🎸 Add task name to sucess message on dry run ([5b9fcd0](https://github.com/thalesraymond/task-runner/commit/5b9fcd0ddd61172687e464cf6a3b5fb65df20cdf))
|
|
27
|
+
* 🎸 metrics per task ([#103](https://github.com/thalesraymond/task-runner/issues/103)) ([c824c56](https://github.com/thalesraymond/task-runner/commit/c824c56dce6d958de8946e1fb9af598bd7e10e5e))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* 🐛 getMermaidGraph ID collision for similar task names ([#100](https://github.com/thalesraymond/task-runner/issues/100)) ([0d3af0d](https://github.com/thalesraymond/task-runner/commit/0d3af0d1663346d31c4d05bfd0eb498456221b2f))
|
|
33
|
+
* 🛰️ Sonar Specialist: Refactor signal combination in TaskRunner ([#107](https://github.com/thalesraymond/task-runner/issues/107)) ([9c383cc](https://github.com/thalesraymond/task-runner/commit/9c383cc7a6657133136945cec01ccc50d30f752d))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Performance Improvements
|
|
37
|
+
|
|
38
|
+
* optimize Mermaid graph ID generation ([#112](https://github.com/thalesraymond/task-runner/issues/112)) ([59e78b1](https://github.com/thalesraymond/task-runner/commit/59e78b1b975e89120d27d827127fbd813a399e36))
|
|
39
|
+
|
|
40
|
+
## [4.0.4](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.3...task-runner-v4.0.4) (2026-01-22)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* 🐛 id-token: writ ([39fbc2b](https://github.com/thalesraymond/task-runner/commit/39fbc2bc83d448cd2385a2c71089832f61f4b3e3))
|
|
46
|
+
|
|
47
|
+
## [4.0.3](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.2...task-runner-v4.0.3) (2026-01-22)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* 🐛 remove npm token (depoys is based on trust setting) ([872d42a](https://github.com/thalesraymond/task-runner/commit/872d42ad35524757f0974e5b46b54b9abf10d7c8))
|
|
53
|
+
|
|
54
|
+
## [4.0.2](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.1...task-runner-v4.0.2) (2026-01-22)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* 🐛 using new action (remove deprecated warning) ([6238bbd](https://github.com/thalesraymond/task-runner/commit/6238bbdfd7689468e4eb650c427848fae8f2d674))
|
|
60
|
+
|
|
61
|
+
## [4.0.1](https://github.com/thalesraymond/task-runner/compare/task-runner-v4.0.0...task-runner-v4.0.1) (2026-01-22)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* 🐛 test ci ([0137225](https://github.com/thalesraymond/task-runner/commit/013722547a31d5429f3024ba21eeefba0fbfc426))
|
|
67
|
+
|
|
68
|
+
## [4.0.0](https://github.com/thalesraymond/task-runner/compare/task-runner-v3.8.4...task-runner-v4.0.0) (2026-01-22)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### ⚠ BREAKING CHANGES
|
|
72
|
+
|
|
73
|
+
* 🧨 Major refactor in the engine, added strategy pattern support
|
|
74
|
+
* **security:** none
|
|
75
|
+
* **security:** none
|
|
76
|
+
* **security:** none
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* 🎸 Generating 3.0.0 since automation wrongly skiped ([c545f25](https://github.com/thalesraymond/task-runner/commit/c545f25be8c689d4a0b518f71635d5b6303b2c64))
|
|
81
|
+
* 🎸 new conditional execution feature ([e936ad7](https://github.com/thalesraymond/task-runner/commit/e936ad71acf5fa3c744b4fa7984f6c7665f75e32))
|
|
82
|
+
* add CI workflow and restore dependabot ([57ae940](https://github.com/thalesraymond/task-runner/commit/57ae940d3dde2adf2de362a48b635def7de2fa7a))
|
|
83
|
+
* add CI workflow and restore dependabot ([48ec98b](https://github.com/thalesraymond/task-runner/commit/48ec98b075feb4bb7e8d339105afdbcb0b5f0fa3))
|
|
84
|
+
* add CI workflow and restore dependabot ([9263c43](https://github.com/thalesraymond/task-runner/commit/9263c43466ee43dd5e07a4edbd9f2ca0b49015e6))
|
|
85
|
+
* add CI workflow for build, lint, and test ([6f97dc0](https://github.com/thalesraymond/task-runner/commit/6f97dc0ee6d1f09de5ddedc64aca73d257e4bc65))
|
|
86
|
+
* add CI workflow for build, lint, and test ([a03422e](https://github.com/thalesraymond/task-runner/commit/a03422ea9ab18cb9f38d8fde58a64c4ce982ff7f))
|
|
87
|
+
* add concurrency control to TaskRunner ([90c2b6f](https://github.com/thalesraymond/task-runner/commit/90c2b6fc7466d9b63820c190e73cc4e96f557335))
|
|
88
|
+
* add concurrency control to TaskRunner ([2a8dfd2](https://github.com/thalesraymond/task-runner/commit/2a8dfd2e825f4802030723c26cf83a51037b99c7))
|
|
89
|
+
* add issue templates ([6ff97f1](https://github.com/thalesraymond/task-runner/commit/6ff97f1140f4de2f3c4a02bd98579474af0893fe))
|
|
90
|
+
* add task priority for concurrency scheduling ([#87](https://github.com/thalesraymond/task-runner/issues/87)) ([43bb6b4](https://github.com/thalesraymond/task-runner/commit/43bb6b4e381dd822358f0e573bfd414a5356d8a5))
|
|
91
|
+
* add task retry policy ([81d4bd3](https://github.com/thalesraymond/task-runner/commit/81d4bd3567a7c4542ba35e311a1a19dd7da7b904))
|
|
92
|
+
* add workflow preview and dry-run capabilities ([e1ccda9](https://github.com/thalesraymond/task-runner/commit/e1ccda9f23e13befd4221cd95b7acfd5500d0e66))
|
|
93
|
+
* add workflow preview and dry-run capabilities ([138f4ae](https://github.com/thalesraymond/task-runner/commit/138f4ae2761d992f111cc108612f4d81b06f6a41))
|
|
94
|
+
* add workflow state persistence proposal ([b62769e](https://github.com/thalesraymond/task-runner/commit/b62769ed128f3c77efb88532c2d2a5d971f0f751))
|
|
95
|
+
* configure semantic-release for automated releases ([fa13bf5](https://github.com/thalesraymond/task-runner/commit/fa13bf5a42f9eb4a4c65aebca28c1b11ff36b618))
|
|
96
|
+
* Implement generic task runner with dependency management and parallel execution ([e0c8bf9](https://github.com/thalesraymond/task-runner/commit/e0c8bf9d3fe8bd7aa14ebb442752e02600c7332e))
|
|
97
|
+
* implement Observer Pattern event system in TaskRunner ([d682983](https://github.com/thalesraymond/task-runner/commit/d682983ebb2aa72eefb05ec06382b206f35473cc))
|
|
98
|
+
* implement Observer Pattern event system in TaskRunner ([48bd3d0](https://github.com/thalesraymond/task-runner/commit/48bd3d0c83bf76dacceee4bb105beb0365816f1c))
|
|
99
|
+
* **implement:** complete file structure refactor ([7764e43](https://github.com/thalesraymond/task-runner/commit/7764e4336effdb8098d4c29c7df5ab10df3d0997))
|
|
100
|
+
* **implement:** complete file structure refactor and cleanup ([372ca8b](https://github.com/thalesraymond/task-runner/commit/372ca8b3703f5e4b3aa14754165ab0fff9451c05))
|
|
101
|
+
* initialize project with TypeScript, Vitest, and basic sum function ([02dd759](https://github.com/thalesraymond/task-runner/commit/02dd75989bfc7a4e9d1f1360fe334284dafd021a))
|
|
102
|
+
* **plan:** create technical plan for file refactor ([29d2a97](https://github.com/thalesraymond/task-runner/commit/29d2a97e0b8b1d98caa27467bf4e865c987e5371))
|
|
103
|
+
* pre-validation of task graph for cycles and missing deps ([4680c1b](https://github.com/thalesraymond/task-runner/commit/4680c1b076abcbd5349129b2ac5db19b4585eec7)), closes [#004](https://github.com/thalesraymond/task-runner/issues/004)
|
|
104
|
+
* **specs:** add spec for file structure refactor ([884c551](https://github.com/thalesraymond/task-runner/commit/884c5512cf9267b4c10a42053019a72abf624650))
|
|
105
|
+
* **tasks:** create tasks for file structure refactor ([3b99e22](https://github.com/thalesraymond/task-runner/commit/3b99e2269220d740ca552733c4bcb41b74bc8108))
|
|
106
|
+
* throw TaskGraphValidationError on validation failure ([35a4e91](https://github.com/thalesraymond/task-runner/commit/35a4e91e66beb7d0660b4059740f4067ab4f2af2))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Bug Fixes
|
|
110
|
+
|
|
111
|
+
* 🐛 fix sanitization of mermaid function ([b09db63](https://github.com/thalesraymond/task-runner/commit/b09db63b2fdad55c5cfb197ce6009cb81a8604f5))
|
|
112
|
+
* 🐛 fixing commit script and adding a fix to test auto relea ([97cedf4](https://github.com/thalesraymond/task-runner/commit/97cedf4acda6c84db02be4549bf0eb7cbc3a4c16))
|
|
113
|
+
* 🐛 trigger ci ([27f6121](https://github.com/thalesraymond/task-runner/commit/27f61216f6aad326409ac4ded114e79c8b9fbd61))
|
|
114
|
+
* 🛡️ Sentinel: Fix Mermaid graph identifier sanitization ([#81](https://github.com/thalesraymond/task-runner/issues/81)) ([a8bebe3](https://github.com/thalesraymond/task-runner/commit/a8bebe3577e2b3f96aaa759bc6eff91b173b5785))
|
|
115
|
+
* 🛰️ Sonar Specialist: Fix dead code in `TaskGraphValidator` ([#93](https://github.com/thalesraymond/task-runner/issues/93)) ([b760765](https://github.com/thalesraymond/task-runner/commit/b76076593cb80f414868872248fad4a8e503f8bd))
|
|
116
|
+
* add file extensions and types to test file to fix CI errors ([54b186f](https://github.com/thalesraymond/task-runner/commit/54b186f7e1bce6e79e2e8ef3b7a501d1be28b467))
|
|
117
|
+
* address PR comments on sonar config ([6eab0b5](https://github.com/thalesraymond/task-runner/commit/6eab0b52fa420bcb26f64737f2915fe20867603d))
|
|
118
|
+
* address PR comments on sonar config ([156eea0](https://github.com/thalesraymond/task-runner/commit/156eea041a1713de20cea3f0e4bac132e4f81649))
|
|
119
|
+
* address pr feedback ([4a23576](https://github.com/thalesraymond/task-runner/commit/4a2357650012fe9e48baa98222576346a2ce1f79))
|
|
120
|
+
* address pr feedback ([97cf83f](https://github.com/thalesraymond/task-runner/commit/97cf83ffa22dba3972a275f99b7eb4da4c012878))
|
|
121
|
+
* change singleQuote option to false in Prettier configuration ([94625a3](https://github.com/thalesraymond/task-runner/commit/94625a3084ee1d6ae218990bf3e9bb5138002415))
|
|
122
|
+
* correct syntax errors in README.md examples and improve context hydration explanation ([98e3a5a](https://github.com/thalesraymond/task-runner/commit/98e3a5abd25e8856aa0c4458e8b7c8555b01a887))
|
|
123
|
+
* **EventBus:** fix lint errors in test file ([86b3ad8](https://github.com/thalesraymond/task-runner/commit/86b3ad86584372552c757ecaf9e47b8ffdec3cb5))
|
|
124
|
+
* **EventBus:** handle floating promises ([#90](https://github.com/thalesraymond/task-runner/issues/90)) ([9872c37](https://github.com/thalesraymond/task-runner/commit/9872c376b912014a73ef180e426d2de5ca771c76))
|
|
125
|
+
* **EventBus:** handle unhandled promise rejections in event listeners ([5f5235a](https://github.com/thalesraymond/task-runner/commit/5f5235adde48f4ce738fe89cad27ddc1023a4445))
|
|
126
|
+
* Fix missing event emission on task cancellation ([#92](https://github.com/thalesraymond/task-runner/issues/92)) ([3d7e7aa](https://github.com/thalesraymond/task-runner/commit/3d7e7aa191686520f0f6d2e721cf1ec2bf7ac983))
|
|
127
|
+
* remove any type usage in TaskRunner to satisfy linter ([b0a21a7](https://github.com/thalesraymond/task-runner/commit/b0a21a748bdf8fb71e14f7ea3a83937b5a36cb2f))
|
|
128
|
+
* remove unreachable code and verify single execution in concurrency logic ([7255cee](https://github.com/thalesraymond/task-runner/commit/7255cee7c686431a4cac0db5e26f2f12e85ea849))
|
|
129
|
+
* resolve linting errors and verify concurrency control ([9ed2585](https://github.com/thalesraymond/task-runner/commit/9ed2585fb2f712c7210fae84dba70152b9ab7169))
|
|
130
|
+
* revert unauthorized changes to package.json and tsconfig.test.json ([cd44f9e](https://github.com/thalesraymond/task-runner/commit/cd44f9e38451a608a73d201624e675612e7b93af))
|
|
131
|
+
* **security:** replace recursive cycle detection with iterative DFS ([2d2e395](https://github.com/thalesraymond/task-runner/commit/2d2e395aab9306610af03ba4b1305ad448d69d63))
|
|
132
|
+
* **security:** replace recursive cycle detection with iterative DFS ([1e2d7ca](https://github.com/thalesraymond/task-runner/commit/1e2d7ca1704ae288fc54258df698621ecab2eceb))
|
|
133
|
+
* **security:** replace recursive cycle detection with iterative DFS ([292947f](https://github.com/thalesraymond/task-runner/commit/292947f67aa8e64adf62bd23c56f1ce06766c16f))
|
|
134
|
+
* standardize quotes and formatting in dependabot configuration ([ab2d7fa](https://github.com/thalesraymond/task-runner/commit/ab2d7fa2bb14c17b300bca64d0c29711bcc0d5f5))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Performance Improvements
|
|
138
|
+
|
|
139
|
+
* **executor:** optimize processQueue loop using pending set ([2924700](https://github.com/thalesraymond/task-runner/commit/2924700cfc161af1500190395d5043a9249388f8))
|
|
140
|
+
* Make event listeners async to prevent blocking ([1f8728f](https://github.com/thalesraymond/task-runner/commit/1f8728f4bd9735868c942223548f13ffc9fb98d5))
|
|
141
|
+
* Make event listeners async to prevent blocking ([a52f8d0](https://github.com/thalesraymond/task-runner/commit/a52f8d09827c27b78a07f342a56c392460f89668))
|
|
142
|
+
* optimize task scheduling to prevent pipeline stalls ([37c52f7](https://github.com/thalesraymond/task-runner/commit/37c52f7ce78b1ee1d8483d4b2c33bd73e585850f))
|
|
143
|
+
|
|
21
144
|
## 3.8.0 (2026-01-21)
|
|
22
145
|
|
|
23
146
|
* feat: add task priority for concurrency scheduling (#87) ([43bb6b4](https://github.com/thalesraymond/task-runner/commit/43bb6b4)), closes [#87](https://github.com/thalesraymond/task-runner/issues/87) [#74](https://github.com/thalesraymond/task-runner/issues/74)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement by contacting the project maintainers.
|
|
63
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
64
|
+
|
|
65
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
66
|
+
reporter of any incident.
|
|
67
|
+
|
|
68
|
+
## Enforcement Guidelines
|
|
69
|
+
|
|
70
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
71
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
72
|
+
|
|
73
|
+
### 1. Correction
|
|
74
|
+
|
|
75
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
76
|
+
unprofessional or unwelcome in the community.
|
|
77
|
+
|
|
78
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
79
|
+
clarity around the nature of the violation and an explanation of why the
|
|
80
|
+
behavior was inappropriate. A public apology may be requested.
|
|
81
|
+
|
|
82
|
+
### 2. Warning
|
|
83
|
+
|
|
84
|
+
**Community Impact**: A violation through a single incident or series of
|
|
85
|
+
actions.
|
|
86
|
+
|
|
87
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
88
|
+
interaction with the people involved, including unsolicited interaction with
|
|
89
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
90
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
91
|
+
like social media. Violating these terms may lead to a temporary or
|
|
92
|
+
permanent ban.
|
|
93
|
+
|
|
94
|
+
### 3. Temporary Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: A serious violation of community standards, including
|
|
97
|
+
sustained inappropriate behavior.
|
|
98
|
+
|
|
99
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
100
|
+
communication with the community for a specified period of time. No public or
|
|
101
|
+
private interaction with the people involved, including unsolicited interaction
|
|
102
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
103
|
+
Violating these terms may lead to a permanent ban.
|
|
104
|
+
|
|
105
|
+
### 4. Permanent Ban
|
|
106
|
+
|
|
107
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
108
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
109
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
110
|
+
|
|
111
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
112
|
+
the community.
|
|
113
|
+
|
|
114
|
+
## Attribution
|
|
115
|
+
|
|
116
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
117
|
+
version 2.1, available at
|
|
118
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
119
|
+
|
|
120
|
+
Community Impact Guidelines were inspired by
|
|
121
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
122
|
+
|
|
123
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
124
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
|
125
|
+
at [https://www.contributor-covenant.org/translations][translations].
|
|
126
|
+
|
|
127
|
+
[homepage]: https://www.contributor-covenant.org
|
|
128
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
129
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
130
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
131
|
+
[translations]: https://www.contributor-covenant.org/translations
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Contributing to task-runner
|
|
2
|
+
|
|
3
|
+
First off, thanks for taking the time to contribute!
|
|
4
|
+
|
|
5
|
+
The following is a set of guidelines for contributing to `@calmo/task-runner`. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
|
6
|
+
|
|
7
|
+
## Code of Conduct
|
|
8
|
+
|
|
9
|
+
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
1. **Fork the repository** on GitHub.
|
|
14
|
+
2. **Clone your fork** locally.
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/your-username/task-runner.git
|
|
17
|
+
cd task-runner
|
|
18
|
+
```
|
|
19
|
+
3. **Install dependencies** using `pnpm`.
|
|
20
|
+
```bash
|
|
21
|
+
pnpm install
|
|
22
|
+
```
|
|
23
|
+
*Note: This project uses `pnpm` for package management. Please do not use `npm` or `yarn`.*
|
|
24
|
+
|
|
25
|
+
## Development Workflow
|
|
26
|
+
|
|
27
|
+
1. **Create a branch** for your feature or fix.
|
|
28
|
+
```bash
|
|
29
|
+
git checkout -b feature/my-new-feature
|
|
30
|
+
```
|
|
31
|
+
2. **Make your changes**.
|
|
32
|
+
3. **Run checks** locally to ensure your changes are valid.
|
|
33
|
+
|
|
34
|
+
### Scripts & Commands
|
|
35
|
+
|
|
36
|
+
The project uses several `pnpm` scripts to maintain code quality:
|
|
37
|
+
|
|
38
|
+
* **Build**: Compile the project.
|
|
39
|
+
```bash
|
|
40
|
+
pnpm build
|
|
41
|
+
```
|
|
42
|
+
* **Test**: Run tests with coverage.
|
|
43
|
+
```bash
|
|
44
|
+
pnpm test
|
|
45
|
+
```
|
|
46
|
+
**Important**: We enforce **100% code coverage**. If your changes lower the coverage, the CI will fail.
|
|
47
|
+
* **Lint**: Check for linting errors.
|
|
48
|
+
```bash
|
|
49
|
+
pnpm lint
|
|
50
|
+
```
|
|
51
|
+
* **Format**: Format the code using Prettier.
|
|
52
|
+
```bash
|
|
53
|
+
pnpm format
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Coding Standards
|
|
57
|
+
|
|
58
|
+
Please strictly adhere to the following rules:
|
|
59
|
+
|
|
60
|
+
* **No `any`**: The use of `any` type is strictly forbidden. Use `unknown` or proper types.
|
|
61
|
+
* **Strict Null Safety**: Do not use `??` or optional chaining `?.` when you can guarantee existence via prior validation. Use non-null assertions `!` only when the invariant is locally provable or enforced by a validator.
|
|
62
|
+
* **Dead Code Elimination**: Avoid `v8 ignore` comments. Logic should be structured to prove unreachability.
|
|
63
|
+
* **Atomic Commits**: For complex features, commit after completing distinct tasks. Ensure `pnpm build`, `pnpm lint`, and `pnpm test` pass before each commit.
|
|
64
|
+
|
|
65
|
+
For more detailed agent-specific instructions (which are also good for humans), refer to `AGENTS.md`.
|
|
66
|
+
|
|
67
|
+
## Commit Messages
|
|
68
|
+
|
|
69
|
+
We follow the **Conventional Commits** specification.
|
|
70
|
+
|
|
71
|
+
You can use the built-in helper to format your commit messages:
|
|
72
|
+
```bash
|
|
73
|
+
pnpm commit
|
|
74
|
+
```
|
|
75
|
+
Or format them manually:
|
|
76
|
+
* `feat(scope): add new feature`
|
|
77
|
+
* `fix(scope): fix bug`
|
|
78
|
+
* `docs: update documentation`
|
|
79
|
+
* `test: add tests`
|
|
80
|
+
* `refactor: refactor code`
|
|
81
|
+
|
|
82
|
+
## Submitting a Pull Request
|
|
83
|
+
|
|
84
|
+
1. Push your changes to your fork.
|
|
85
|
+
2. Open a Pull Request against the `main` branch.
|
|
86
|
+
3. Ensure the PR description clearly describes the problem and solution.
|
|
87
|
+
4. Make sure all CI checks pass.
|
|
88
|
+
|
|
89
|
+
Thank you for your contributions!
|
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ When calling `execute`, you can provide a configuration object:
|
|
|
120
120
|
- **signal**: Accepts an `AbortSignal` to cancel the workflow programmatically.
|
|
121
121
|
- **dryRun**: Overrides the current strategy with `DryRunExecutionStrategy` for this execution.
|
|
122
122
|
|
|
123
|
-
```typescript
|
|
123
|
+
```typescript
|
|
124
124
|
await runner.execute(steps, {
|
|
125
125
|
concurrency: 2,
|
|
126
126
|
dryRun: true
|
package/dist/TaskResult.d.ts
CHANGED
|
@@ -11,4 +11,13 @@ export interface TaskResult {
|
|
|
11
11
|
error?: string;
|
|
12
12
|
/** Optional data produced by the step for later inspection. */
|
|
13
13
|
data?: unknown;
|
|
14
|
+
/** Optional execution metrics for the task. */
|
|
15
|
+
metrics?: {
|
|
16
|
+
/** Start time in milliseconds (performance.now). */
|
|
17
|
+
startTime: number;
|
|
18
|
+
/** End time in milliseconds (performance.now). */
|
|
19
|
+
endTime: number;
|
|
20
|
+
/** Duration in milliseconds. */
|
|
21
|
+
duration: number;
|
|
22
|
+
};
|
|
14
23
|
}
|