Skip to content

Commit 7fc8dc7

Browse files
committed
feat: pi-taskflow v0.0.1 — lightweight workflow orchestration for pi
Declarative multi-phase taskflows: - DAG runtime (agent/parallel/map/gate/reduce phases) - dynamic map fan-out with bounded concurrency - isolated subagent context (intermediate results stay out of main context) - cross-session resumable runs - saveable flows as /tf:<name> commands Includes 23 unit tests + real end-to-end test (live subagent spawn). CI + npm publish workflows (public registry, provenance).
0 parents  commit 7fc8dc7

22 files changed

Lines changed: 3053 additions & 0 deletions

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: "22"
17+
registry-url: "https://registry.npmjs.org"
18+
- name: Install dependencies
19+
run: npm install --registry https://registry.npmjs.org/
20+
- name: Typecheck
21+
run: npm run typecheck
22+
- name: Unit tests
23+
run: npm test

‎.github/workflows/publish.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish to npm
2+
3+
# Publishes to the public npm registry when a GitHub Release is published,
4+
# or when a v* tag is pushed. Requires the NPM_TOKEN repository secret
5+
# (an Automation token from your PUBLIC npm account).
6+
7+
on:
8+
release:
9+
types: [published]
10+
push:
11+
tags:
12+
- "v*"
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
id-token: write # enables npm provenance
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: "22"
25+
registry-url: "https://registry.npmjs.org"
26+
27+
- name: Install dependencies
28+
run: npm install --registry https://registry.npmjs.org/
29+
30+
- name: Typecheck
31+
run: npm run typecheck
32+
33+
- name: Unit tests
34+
run: npm test
35+
36+
- name: Verify tag matches package version
37+
if: startsWith(github.ref, 'refs/tags/v')
38+
run: |
39+
PKG_VERSION="v$(node -p "require('./package.json').version")"
40+
TAG="${GITHUB_REF_NAME}"
41+
if [ "$PKG_VERSION" != "$TAG" ]; then
42+
echo "::error::Tag $TAG does not match package.json version $PKG_VERSION"
43+
exit 1
44+
fi
45+
46+
- name: Publish (public, with provenance)
47+
run: npm publish --access public --provenance
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.gitignore‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
dist/
3+
*.log
4+
.DS_Store
5+
.pi/taskflows/runs/
6+
7+
# Lockfile omitted: generated against internal mirror locally; CI installs from public npm
8+
package-lock.json

0 commit comments

Comments
 (0)