tao represents a new way of programming
| package | description | docs page |
|---|---|---|
npm @tao.js/core |
Core Javascript implementation of the TAO ☯ programming paradigm | tao.js.org |
npm @tao.js/utils |
Extensions to Core used to build out the Signal Network | tao.js Utilities for Implementers |
npm @tao.js/react |
Adapter to use tao.js with React | Usage with React.js |
npm @tao.js/socket.io |
socket.io middleware to run tao.js seamlessly on server & client | tao.js for Socket.io |
npm @tao.js/koa |
Expose a TAO signal network over http using a koa app server | tao.js for Koa |
npm @tao.js/router |
connects url routing with tao.js | URL Handling with @tao.js/router |
Docs at tao.js.org
| char | code | symbol |
|---|---|---|
| ☯ | U+262F | yin-yang |
| ☰ | U+2630 | heaven |
| ☱ | U+2631 | lake |
| ☲ | U+2632 | fire |
| ☳ | U+2633 | thunder |
| ☴ | U+2634 | wind/wood |
| ☵ | U+2635 | water |
| ☶ | U+2636 | mountain |
| ☷ | U+2637 | earth |
This really needs to be filled out
The repo is designed to use asdf and pnpm so that nothing is expected to be installed globally.
Additionally, to run the examples you should have Docker installed locally as well.
In the root of the repo:
$ asdf install
$ pnpm installThe Example work are the folders inside the [examples] directory. To run them:
# in repo root dir
$ docker-compose up -d
# once db is running
$ cd examples/patois.api
$ pnpm start
$ cd ../patois.web
$ pnpm startThis project uses Nx + pnpm workspaces to manage the monorepo.
# Install dependencies
pnpm install
# Create a new commit (with conventional commit messages)
pnpm run commit
# Build all packages
pnpm run build
# Build specific package
pnpm exec nx build @tao.js/core
# Run tests
pnpm run test
# Run linting
pnpm run lint
# Run linting on specific package
pnpm exec nx lint @tao.js/coreNx infers projects from package.json files under packages/ and examples/ — there are no project.json files. @nx/jest/plugin discovers tests via each package's jest.config.js (using the root jest.preset.cjs), and @nx/eslint/plugin provides lint targets. Root scripts use nx run-many.
To add a new package:
- Create your package directory in
packages/(covered by pnpm workspaces viapackages/*) - Add a
package.jsonwith the package name, build scripts (build,build:clean,build:package, etc.), and npm publishing config - Add a
jest.config.jsthat extends the root preset, e.g.preset: '../../jest.preset.cjs'
We use commitizen for standardized commit messages. The commit prompt will ask for:
- Type of change (feat, fix, docs, etc.)
- Scope (package name)
- Short description
- Long description (optional)
- Breaking changes (optional)
# View dependency graph
pnpm exec nx graph
# Run command only on changed packages
pnpm exec nx affected --target=build
# Run command on specific package
pnpm exec nx build @tao.js/core
pnpm exec nx test @tao.js/core.
├── packages/
│ ├── tao/ # @tao.js/core
│ ├── tao-utils/ # @tao.js/utils
│ ├── react-tao/ # @tao.js/react
│ └── ...
├── nx.json
├── package.json
├── pnpm-workspace.yaml
└── .cz-config.js
For more information:
This project uses a Commitizen-compatible commit message format, plus husky hooks for prettier / jest (lint-staged) and message validation.
Humans (interactive): stage changes, then either:
$ git commit(opens the wizard when a TTY is available), or:
$ pnpm run commitAgents / non-interactive: use git commit -m with the same message shape (must include an Affected packages: section). See AGENTS.md → Commit messages. The commit-msg hook validates; it does not require Cursor.
- bootstrapping
- add test coverage reporting
- complete
@tao.js/corepackage- refactor the
taoAPI for consistency - e.g. replace external references toterm=>t,action=>a,orient=>o - write unit tests
- adding inline handler unit tests
- adding async handler unit tests
- adding intercept handler unit tests
- removing inline handler unit tests
- removing async handler unit tests
- removing intercept handler unit tests
- using
asPromiseHook
- refactor intercept handler to
awaitlike inline handler calls do to match guarantee provided in docs
- refactor the
- complete initial
@tao.js/reactpackage- port
Adapter - port
Reactor - unit tests for
Adapter - unit tests for
Reactor - enable
Adapterto unset current component usingnullas a handler for TAO ACs - make trigram definition on
Adapter.addComponentHandler#2 method consistent with@tao.js/core
- port
- update to
@tao.js/react- goal: provide more idiomatic & declarative React components to use with tao.js (keep the old stuff)
- implement
Providerthat creates a Context used by the rest of the new React Components - supplies TAO Kernel to Consumers - implement
RenderHandlerwith child as function to render anything based on triggered handler - implement
SwitchHandlerthat works likeReactorto choose which direct childRenderHandlers to display based on signaled ACs - turns off/removesRenderHandlers likeAdapterunlike standaloneRenderHandler - implement
DataHandlerthat supplies data as aReact.ProvidertoRenderHandlerconsumers below from data passed into it'shandler - refactor
DataHandlerlogic for its context intocreateContextHandlerfor reuse and expose for public use - implement
withContextHOC - implement dynamic props (aka if props change after mounting) for
Provider - implement dynamic props (aka if props change after mounting) for
createContextHandler - implement dynamic props (aka if props change after mounting) for
DataHandler - implement dynamic props (aka if props change after mounting) for
withContext - implement dynamic props (aka if props change after mounting) for
RenderHandler - implement dynamic props (aka if props change after mounting) for
SwitchHandler - unit tests for
Provider - unit tests for
createContextHandler - unit tests for
DataHandler - unit tests for
withContext - unit tests for
RenderHandler - unit tests for
SwitchHandler - docs for
Provider - docs for
createContextHandler - docs for
DataHandler - docs for
withContext - docs for
RenderHandler - docs for
SwitchHandler
- complete
@tao.js/socket-iopackage- figure out how to ensure responses go to same requestor
- implement using new
Kernel/ socket - unit tests
- integrate into
patoisexample app - handle file uploads
- write phase 1 of
docs - complete
@tao.js/routerpackage- update location from AppCons
- initialize route config
- dynamically add routes
- dynamically remove routes
- get AppCon from incoming route
- integrate into
patoisexample app - update
docswith@tao.js/router - unit tests
- implement query string handling
- project infrastructure updates from stream npm security issue
- update deps w lodash deps security warnings from github
- update
lernato v3 - update
cz-lerna-changelogfor v3 support - include
makescripts for common chores - upgrade
@babelpackages - migrate to
yarnfor better dependency management? - use rollup.js for package build?
- complete
@tao.js/react-routerpackage- implement
Linkcomponent to set context - update
docswith@tao.js/react-routerrouting
- implement
- complete
@tao.js/koapackage- finish middleware design
- figure out how to ensure responses go to same requestor
- unit tests
- update
docswith@tao.js/koa
- complete
@tao/http-clientpackage- unit tests
- update
docswith@tao.js/http-client
- complete
@tao.js/connectpackage- unit tests
- update
docswith@tao.js/connect
- complete
@tao.js/pathpackage- unit tests
- update
docswith@tao.js/path
- complete
@tao.js/meshpackage- unit tests
- update
docswith@tao.js/mesh
- complete
@tao.js/featurepackage- unit tests
- update
docswith@tao.js/feature
- complete
@tao.js/clipackage- unit tests
- update
docswith@tao.js/cli
- complete
@tao.js/rest-makerpackage- unit tests
- update
docswith@tao.js/rest-maker
Public packages (@tao.js/core, @tao.js/utils, @tao.js/react, @tao.js/router, @tao.js/socket.io, @tao.js/koa) are released together at the same version (same as the old Lerna fixed-version flow) via Nx Release. That keeps peer dependency management simple for consumers. Private packages are excluded.
# Build artifacts into each package's dist/lib/bundles
pnpm run build
# Preview (no git/npm writes). Pass a semver bump or exact version:
pnpm exec nx release patch --dry-run --first-release --skip-publish
# or sync everyone to one version explicitly:
# pnpm exec nx release 0.16.3 --dry-run --first-release --skip-publish
# Create the shared version, update root CHANGELOG.md, git commit + tag
# (prompts to publish; use --skip-publish to only version)
pnpm exec nx release patch --first-release --skip-publish
# Publish already-versioned packages
pnpm run release:publishAfter the first release (once a v{version} tag exists), drop --first-release. Tags look like v0.16.3. You need npm auth (npm login / NPM_TOKEN) to publish.
Package versions on disk currently drift slightly (leftover from pre-Nx). The first fixed release should use an exact version (e.g. 0.16.3) so all public packages converge.
Caveats (Nx 21.3):
- Pass an explicit bump (
patch/minor/major/ exact version). Do not rely on conventional-commit auto-bump yet — full history would incorrectly force majors. "*"peerDependencies are preserved viatools/release/version-actions.cjs(Nx 21.3 does not yet shippreserveMatchingDependencyRanges).
Finding trigrams in code
- search w/ regex
{term}.*{action}.*{orient} - build VS Code extension to find and navigate to them: signalling and handling
Refactoring data passing from one part to another
Forwarding with passing all data parts
Auth Handling
Stop bouncing ALL trigrams with socket.io - use seive or filtering
Verify that Intercept Handlers prevent signals from going to the server via socket.io
Logging support and shipping all ACs somewhere
Capturing TRACE_IDs and SPANs (from inside the network?)
Joiner (for fork-join) will call handler when all provided trigrams have been seen
- used to coordinate out of race conditions *Continuous Joiner - after they've all been seen, it fires again any time one of the trigrams are seen with a cache of the previous values from the other ACs
Return array of AppCtx from handler
Done on upgrade-react-19: named data is nested on the shared Provider Context value
(data[name]) as each DataHandler renders, so useTaoDataContext / DataConsumer /
RenderHandler see values on the first render (including under Strict Mode). See
REACT-19-UPGRADE.md.