Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0ae6b4e
test: add workflow configuration fixtures
demetere Jul 16, 2026
57c4ee1
refactor(tests): rename workflow fixture directory
demetere Jul 16, 2026
209fc73
feat(config): checkpoint schema-v1 foundation
demetere Jul 17, 2026
d974f51
fix(config): complete schema-v1 validation gates
demetere Jul 17, 2026
5bc11ab
fix(config): address schema review findings
demetere Jul 17, 2026
d46b558
feat(config): add manifest discovery and registries
demetere Jul 17, 2026
e46da61
feat(config): add catalog resource loaders
demetere Jul 17, 2026
495ca73
feat(config): resolve workflow definitions
demetere Jul 18, 2026
e654b3e
feat(config): add immutable activation snapshots
demetere Jul 18, 2026
bc3b9fc
feat(policy): resolve workflow capabilities
demetere Jul 18, 2026
a2f7117
feat(policy): enforce filesystem capabilities
demetere Jul 18, 2026
012c719
fix(policy): keep filesystem core Node compatible
demetere Jul 18, 2026
33657d1
feat(policy): enforce command and network capabilities
demetere Jul 18, 2026
1f1cbc7
feat(runtime): add authoritative workflow journal
demetere Jul 18, 2026
36f0974
feat(workflows): add linked session navigation
demetere Jul 18, 2026
5746d02
chore(tests): organize suite by domain
demetere Jul 18, 2026
c5cf3c3
feat(runtime): add workflow run lifecycle
demetere Jul 18, 2026
a012a24
feat(runtime): add durable delegation scheduler
demetere Jul 18, 2026
90d5be3
feat(runtime): enforce budgets and effect recovery
demetere Jul 18, 2026
e89ec91
feat(workflows): add deterministic prompts and tools
demetere Jul 18, 2026
cd00dca
feat(workflows): add handoff and orphan recovery
demetere Jul 18, 2026
13556ca
feat(artifacts): add adapter contracts and none profile
demetere Jul 19, 2026
9a4465d
feat(artifacts): add workspace leases and recovery
demetere Jul 19, 2026
21984b1
feat(artifacts): add checkpoint approvals
demetere Jul 19, 2026
02e3b4a
feat(artifacts): add OpenSpec adapter profiles
demetere Jul 19, 2026
f2c154d
feat(artifacts): add Markdown plan adapter
demetere Jul 19, 2026
26ad261
feat(workflows): add durable human questions
demetere Jul 19, 2026
0a79742
feat(knowledge): add local OKF retrieval
demetere Jul 20, 2026
0d01151
test(policy): tolerate missing ripgrep binary
demetere Jul 20, 2026
27e7de1
fix(knowledge): support strip-only TypeScript
demetere Jul 20, 2026
c8cea0e
feat(knowledge): add durable enrichment workflow
demetere Jul 20, 2026
c66d7a8
fix(knowledge): synchronize enrichment reconciliation
demetere Jul 20, 2026
258db5e
ci: bound temporary upstream audit exception
demetere Jul 21, 2026
7b7cdb3
feat(observability): add workflow telemetry projection
demetere Jul 21, 2026
f52a71e
test(observability): support Node 20 assertions
demetere Jul 21, 2026
0fa81a9
feat(dashboard): add workflow server API
demetere Jul 21, 2026
4c1a657
feat(ui): add workflow dashboard and commands
demetere Jul 22, 2026
4b8b624
fix(deps): update fast-uri security patch
demetere Jul 22, 2026
ef99a42
refactor!: cut over to workflow architecture
demetere Jul 22, 2026
f179803
fix: close workflow release-gate gaps
demetere Jul 22, 2026
bc12159
Merge branch 'main' into develop/workflow-rewrite
demetere Jul 24, 2026
f1427a1
fix: address security scan findings
demetere Jul 24, 2026
bd1e6bc
fix(dashboard): restart workflow daemon from dev symlink
demetere Jul 24, 2026
6190f2a
feat(dashboard): restore mission control experience
demetere Jul 24, 2026
7c4dca1
fix(workflows): select compatible inherited models
demetere Jul 24, 2026
32e27f2
fix(workflows): adapt context budgets to selected model
demetere Jul 24, 2026
f3e7560
fix(workflows): reject unsupported hosts before selection
demetere Jul 24, 2026
d84400e
feat(workflows): add secure macOS runtime support
demetere Jul 24, 2026
a74643d
fix(ci): install just on macOS runners
demetere Jul 24, 2026
0e5762e
fix(ci): run macOS parity gates on supported Node
demetere Jul 24, 2026
293f773
fix(workflows): bound large change baselines
demetere Jul 24, 2026
d6c216b
feat(dashboard): support shared multi-project views
demetere Jul 31, 2026
9269d25
feat(commands): rename dashboard controls and add restart
demetere Jul 31, 2026
666add3
docs(dashboard): document project switching and controls
demetere Jul 31, 2026
ab55f41
refactor(dashboard): consolidate project navigation
demetere Jul 31, 2026
4efd95a
feat(workflows): catalog configured definitions
demetere Jul 31, 2026
53e01f1
feat(dashboard): add workflow topology drill-down
demetere Jul 31, 2026
a65911a
feat(dashboard): add clean view routes
demetere Jul 31, 2026
ec3b3f0
feat(dashboard): fold run history into sessions
demetere Jul 31, 2026
e3cd262
feat(dashboard): add modular theme renderers
demetere Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 31 additions & 3 deletions .github/scripts/install-just.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,28 @@
set -euo pipefail

readonly JUST_VERSION="1.56.0"
readonly JUST_ARCHIVE="just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz"
readonly JUST_SHA256="fa2a8ec1015d9df5330941ade12437488fc40d33f9c9f8cd4eb70a26de11b639"
case "$(uname -s)-$(uname -m)" in
Linux-x86_64)
readonly JUST_ARCHIVE="just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz"
readonly JUST_SHA256="fa2a8ec1015d9df5330941ade12437488fc40d33f9c9f8cd4eb70a26de11b639"
;;
Linux-aarch64)
readonly JUST_ARCHIVE="just-${JUST_VERSION}-aarch64-unknown-linux-musl.tar.gz"
readonly JUST_SHA256="c8c1d656e9f47569ec1ae2bf8779af2621cdeea6bbbba3b0cacd64f951d25e2b"
;;
Darwin-arm64)
readonly JUST_ARCHIVE="just-${JUST_VERSION}-aarch64-apple-darwin.tar.gz"
readonly JUST_SHA256="f35798d4bcdc4db020eef7d2853ad98bbfb97a4d29ee695ba042f18e7fedcc11"
;;
Darwin-x86_64)
readonly JUST_ARCHIVE="just-${JUST_VERSION}-x86_64-apple-darwin.tar.gz"
readonly JUST_SHA256="09b35ff6d17023ffae37ce408d1a78a976d9e001cae54b88e238f7f40db9b783"
;;
*)
printf 'Unsupported just installer platform: %s-%s\n' "$(uname -s)" "$(uname -m)" >&2
exit 1
;;
esac
readonly JUST_URL="https://github.com/casey/just/releases/download/${JUST_VERSION}/${JUST_ARCHIVE}"
readonly DOWNLOAD_DIR="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/pi-hive-just-${JUST_VERSION}"
readonly INSTALL_DIR="${HOME}/.local/bin"
Expand All @@ -14,7 +34,15 @@ curl --fail --location --proto '=https' --tlsv1.2 \
--retry 3 --retry-all-errors \
--output "${DOWNLOAD_DIR}/${JUST_ARCHIVE}" \
"${JUST_URL}"
printf '%s %s\n' "${JUST_SHA256}" "${DOWNLOAD_DIR}/${JUST_ARCHIVE}" | sha256sum --check --strict
if command -v sha256sum >/dev/null 2>&1; then
actual_sha256="$(sha256sum "${DOWNLOAD_DIR}/${JUST_ARCHIVE}" | awk '{print $1}')"
else
actual_sha256="$(shasum -a 256 "${DOWNLOAD_DIR}/${JUST_ARCHIVE}" | awk '{print $1}')"
fi
if [[ "${actual_sha256}" != "${JUST_SHA256}" ]]; then
printf 'just archive checksum mismatch: expected %s, received %s\n' "${JUST_SHA256}" "${actual_sha256}" >&2
exit 1
fi
tar --extract --gzip --file "${DOWNLOAD_DIR}/${JUST_ARCHIVE}" --directory "${DOWNLOAD_DIR}" just
install -m 0755 "${DOWNLOAD_DIR}/just" "${INSTALL_DIR}/just"
printf '%s\n' "${INSTALL_DIR}" >> "${GITHUB_PATH}"
Expand Down
35 changes: 32 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,36 @@ jobs:
run: npm ci --prefix ui/web

- name: Run Node.js compatibility gates
run: just typecheck-core test-node-compat dashboard-typecheck dashboard-test-unit
run: just typecheck-core test-node-compat dashboard-typecheck dashboard-test-unit verify-node-package-compat

macos:
name: macOS workflow runtime
runs-on: macos-14
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "lts/*"
cache: "npm"

- name: Install just
run: bash .github/scripts/install-just.sh

- name: Install root dependencies
run: npm ci

- name: Install dashboard dependencies
run: npm ci --prefix ui/web

- name: Verify and rebuild Darwin native helpers
run: just darwin-native-verify && just darwin-native-build && just darwin-native-verify

- name: Run macOS core gates
run: just typecheck-core test verify-node-package-compat

verify:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -81,7 +110,7 @@ jobs:
run: just ci

- name: Require committed generated artifacts
run: git diff --exit-code -- ui/web/dist ui/review/dist
run: git diff --exit-code -- ui/web/dist schemas

- name: Generate coverage reports
run: just coverage
Expand Down Expand Up @@ -111,7 +140,7 @@ jobs:
run: node scripts/check-licenses.mjs

- name: Audit root dependencies
run: npm audit --audit-level=high
run: node scripts/check-npm-audit.mjs

- name: Audit dashboard dependencies
run: npm audit --prefix ui/web --audit-level=high
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release

# Publishes to npm. Trigger either by publishing a GitHub Release:
# gh release create v0.1.0 --generate-notes
# gh release create vX.Y.Z --generate-notes
# or manually, passing the existing tag:
# gh workflow run Release -f tag=v0.1.0
# gh workflow run Release -f tag=vX.Y.Z
# The tag must match the package.json version, or the job fails before publishing.

on:
Expand All @@ -12,7 +12,7 @@ on:
workflow_dispatch:
inputs:
tag:
description: "Existing git tag to publish (e.g. v0.1.0)"
description: "Existing git tag to publish (e.g. vX.Y.Z)"
required: true
type: string

Expand All @@ -28,7 +28,7 @@ jobs:
publish:
environment: npm
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 60
steps:
- name: Resolve release tag
id: tag
Expand Down Expand Up @@ -99,23 +99,30 @@ jobs:
fi

- name: Run release gates
run: just ci
run: just release-gate

- name: Verify tagged release state
env:
RELEASE_TAG: ${{ steps.tag.outputs.value }}
run: just release-verify

- name: Publish to npm with trusted publishing
env:
RELEASE_TAG: ${{ steps.tag.outputs.value }}
run: npm publish --provenance --access public

- name: Generate release SBOMs and dependency manifest
run: just release-artifacts

- name: Validate release artifacts
run: just release-artifacts-verify

- name: Attach release artifacts
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ steps.tag.outputs.value }}
run: gh release upload "$RELEASE_TAG" release-artifacts/* --clobber

# The aggregate above is the authoritative workflow gate. Ignoring npm
# lifecycle scripts here avoids rerunning the same full gate recursively;
# direct local npm publish still executes prepublishOnly, including artifact
# generation and validation after the unchanged tagged-state check.
- name: Publish to npm with trusted publishing
env:
RELEASE_TAG: ${{ steps.tag.outputs.value }}
run: npm publish --provenance --access public --ignore-scripts
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ coverage/

# Runtime hive state / local telemetry
.pi/
# Workflow configuration fixtures intentionally contain nested project manifests.
!/tests/fixtures/workflow-configs/**/.pi/
!/tests/fixtures/workflow-configs/**/.pi/**
.atl/
*.db
*.db-shm
Expand All @@ -26,10 +29,13 @@ coverage/

# Local project notes and temporary planning documents
/notes/
/.pi-subagents/

# NOTE: ui/web/dist/ is intentionally NOT ignored — it ships prebuilt so the
# extension needs no build step at install time. Rebuild it after editing
# ui/web/src/ with: just dashboard-build

# Local Claude Code workspace (skills, scheduled tasks, etc.)
.claude/
!examples/**/.pi/
!examples/**/.pi/**
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Project purpose

`pi-hive` is a Pi package that provides a hierarchical multi-agent orchestration extension plus a local telemetry dashboard.
`pi-hive` is a Linux and macOS Pi package that provides a hierarchical multi-agent orchestration extension plus a local telemetry dashboard. Darwin descriptor-relative filesystem operations must use the committed N-API helper and preserve Linux-equivalent fail-closed identity guarantees. Do not claim Windows process-tree termination support; Windows-form paths remain fail-closed security test inputs.

The extension must stay safe to install globally: it should do nothing unless the current project opts in with `.pi/hive/hive-config.yaml`.

Expand Down
36 changes: 21 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Changelog

All notable changes to pi-hive are documented here. Release headings match the
version in `package.json`; the release workflow refuses to publish a version
without a corresponding section.
## [1.0.0] - 2026-07-22

## [Unreleased]
### Breaking

### Changed
- Replaced the fixed pre-1.0 runtime with schema-v1 config-first workflows.
- Removed fixed mode switching, dual-team configuration, semantic agent enforcement, planner stages, fixed artifact commands, keyboard cycling, and plan-specific dashboard routes.
- Removed automatic loading of pre-1.0 configuration and durable YAML memory. Migration is manual; see README and SETUP.
- Started a separate workflow telemetry projection. Historical telemetry files remain untouched and are not displayed or migrated.

- Hardened release publishing with protected-environment approval, npm trusted
publishing, reproducibility checks, and attached software bills of materials.
### Added

## [0.1.0] - 2026-07-05
- Strict YAML registries, reusable agents, recursive workflow teams, immutable activation snapshots, and capability narrowing.
- Linked workflow sessions with multi-run chat semantics, explicit handoff, recovery, cancellation, budgets, and change accounting.
- Generic artifact adapters for `none`, Markdown plans, and OpenSpec with leases, checkpoints, and exact approvals.
- Durable questions, attached local OKF knowledge, bounded enrichment, workflow telemetry, authenticated API v1, and the workflow dashboard.
- Checked-in combined, split-handoff, Markdown lifecycle, artifact-free, and invalid migration examples.
- Added macOS arm64/x64 workflow-runtime support with packaged N-API descriptor-relative filesystem helpers and Darwin process identity.

### Added
### Fixed

- Added lazy, bind-once artifact workspace discovery and explicit `workspace-bind` dispatch through the generic artifact tools, so production combined, Markdown, and split workflows no longer require out-of-band runtime binding.
- Packaged the combined and split OpenSpec examples with a minimal initialized `openspec/` layout, so copied examples can scaffold their first workspace without hidden setup.
- Made idle normal and workflow Pi 0.80 sessions safely persistable, precreated linked sessions through Pi's public `SessionManager`, and committed replacement authority before the single native switch so the first target `session_start` restores the exact runtime without a follow-up reload.

- Hierarchical multi-agent orchestration for opted-in Pi projects.
- OpenSpec-backed planning, review, approval, and execution gates.
- Local-only telemetry collection and a prebuilt React dashboard.
- Project-scoped policy enforcement, lifecycle management, and privacy controls.
### Security

[Unreleased]: https://github.com/demetere/pi-hive/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/demetere/pi-hive/releases/tag/v0.1.0
- Preserved unconfigured inertness, Node-compatible core loading, loopback-only dashboard binding, authenticated exact-object controls, bounded output/pagination, and Pi mutation-queue participation.
- Documented that capability enforcement is not an OS sandbox, network denial is best effort, and delegation prose is not DLP.
41 changes: 20 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Thanks for your interest in improving `pi-hive`. This guide covers the toolchain,
the local workflow, and the gates your change must pass.

New here? Read the [README](./README.md) "What this is" section for the concepts
(config-first ownership, the plan → hive flow, OpenSpec, Plannotator) and
[SETUP.md](./SETUP.md) for how a hive is authored. The extension is config-first:
New here? Read the [README quick start](./README.md#quick-start) for schema-v1
workflow selection, linked sessions, capability policy, and artifact adapters, then
[SETUP.md](./SETUP.md) for how a workflow is authored. The extension is config-first:
it registers nothing until a project has `.pi/hive/hive-config.yaml`, so keep that
opt-in guarantee intact in any change.

Expand All @@ -17,10 +17,10 @@ Install these before building:
task routes through the `Justfile`, which is the source of truth. Run `just --list`
to see all recipes. (CI installs `just` via its official script; do the same
locally.)
- **[Bun](https://bun.sh) ≥ 1.1** — required for the telemetry dashboard server
- **[Bun](https://bun.sh) ≥ 1.3.14** — required for the local dashboard server
(`bun:sqlite`) and the Bun-only test suite (`just test-db`).
- **[Node.js](https://nodejs.org) ≥ 20** — runs the extension and the Node test suite.
CI uses Node 24.
- **[Node.js](https://nodejs.org) ≥ 20.19.0** — runs the extension, build tools,
and the Node test suite. CI uses Node 24.
- **[Pi](https://github.com/earendil-works/pi-coding-agent)** — to actually run the
extension end to end. Pi provides `@earendil-works/pi-coding-agent` and
`@earendil-works/pi-tui` at load time (they are peer dependencies).
Expand All @@ -43,7 +43,7 @@ The extension only activates in a project that contains `.pi/hive/hive-config.ya

## Working on the dashboard

The dashboard is a Solid + Vite SPA under `ui/web/`. Its built bundle
The dashboard is a React + Vite SPA under `ui/web/`. Its built bundle
(`ui/web/dist/`) is **committed** so end users need no build step. After editing
anything under `ui/web/src/`, rebuild and re-stamp the bundle:

Expand All @@ -59,22 +59,22 @@ running telemetry server.

## Before you open a PR

Run the same gates as CI:
Run the local verification gate, then the same aggregate gate as CI:

```sh
just ci # typecheck (core + dashboard), tests, dashboard freshness,
# package-manifest verification, and `npm pack --dry-run`
just verify # ESLint, typechecks, tests, generated/dashboard/package checks
just ci # verify plus clean packaging and install/release checks
```

Your PR must pass `just ci` green.
Your PR must pass both `just verify` and `just ci` green. ESLint is mandatory;
fix lint findings rather than bypassing the configured rules.

## Code style

There is no ESLint/Prettier gate by design — TypeScript's type checkers
(`strict` for the dashboard, `noImplicitAny` for the core) are the enforced
correctness gate. Match the surrounding style: 2-space indent, double quotes,
semicolons, named exports. Keep diffs minimal and idiomatic to the file you are
editing.
ESLint and TypeScript's type checkers (`strict` for the dashboard and core)
are enforced by `just verify` and `just ci`. Match the surrounding style:
2-space indent, double quotes, semicolons, and named exports. Keep diffs minimal
and idiomatic to the file you are editing.

## Commit and PR conventions

Expand Down Expand Up @@ -111,15 +111,14 @@ You can also publish an existing tag manually (e.g. if the release event doesn't
fire): `gh workflow run Release -f tag=vX.Y.Z`, or via the Actions tab → Release →
"Run workflow".

The tag (e.g. `v0.1.0`) must match `package.json`'s version, and `just ci` must
The tag (e.g. `vX.Y.Z`) must match `package.json`'s version, and `just ci` must
pass, or the workflow fails before publishing — so a broken or mistagged build
cannot ship. The published tarball ships only the `files` allowlist (runtime code +
the prebuilt `ui/web/dist/`); dependency folders never ship.

**One-time setup:** add an npm access token that can publish in CI — a **granular**
token with "bypass 2FA" enabled, or a classic **automation** token — as the
`NPM_TOKEN` repository secret (Settings → Secrets and variables → Actions). A plain
publish token fails with a 403 when the account has 2FA-on-publish enabled.
**One-time setup:** configure the npm package's GitHub Actions trusted publisher
for this repository and the protected `npm` environment. The release workflow uses
GitHub OIDC with provenance and intentionally has no long-lived npm token fallback.
Publishing to npm is what makes the package appear in the gallery.

## Security
Expand Down
Loading
Loading