fix: address review findings — CJS build (tsup), workflowCost signature, bottlenecks empty-graph test

- C1(critical): Replace tsc build with tsup for dual ESM + CJS output
- W2(warning): Change workflowCost to accept TaskGraph instead of TaskGraphInner
- S1(suggestion): Add test for bottlenecks empty-graph early return
- S2(suggestion): Document dangling-reference detection is unreachable via public API
This commit is contained in:
2026-04-27 19:56:43 +00:00
parent 55600ac95a
commit 039a6ccfe1
9 changed files with 473 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
---
id: api/public-exports
name: Wire up public API surface in src/index.ts
status: pending
status: completed
depends_on:
- graph/taskgraph-class
- graph/construction
@@ -54,4 +54,10 @@ Wire up `src/index.ts` to re-export the full public API surface. This is the mai
## Summary
> To be filled on completion
Implemented the public API surface in `src/index.ts` using selective named re-exports instead of wildcard `export *`, ensuring no internal implementation details leak through.
- Modified: `src/index.ts` — rewrote with selective named exports for all public API items
- Modified: `src/schema/task.ts` — removed internal `Nullable` re-export (kept import for internal use)
- Modified: `src/schema/index.ts` — switched to `export *` (kept as barrel; public API filtering is in src/index.ts)
- Modified: `test/schema.test.ts` — removed test for `Nullable` re-export from task.ts (no longer exported)
- Tests: 590, all passing