npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agenticprimitives/coordination

v0.0.0-alpha.4

Published

Coordination core: Endeavor, OutcomeSpecification, CoordinationPlan, Participation — spec 332 W1.

Readme

@agenticprimitives/coordination

The Endeavor coordination core (spec 332, Wave 1): a durable, shared, multi-principal coordination object — someone posted a request; the group adopted it as a goal; a shared plan was proposed, revised, and adopted; participants were allocated and committed; work executed against plan steps; the outcome was validated — expressed as a pure, deterministic, event-sourced machine.

Install

pnpm add @agenticprimitives/coordination

Subpath exports: . (everything), ./core (records, commands, events, reducer, provenance inputs), ./planning (plans, steps, edges, milestones, content hash, acyclicity), ./participation (participations, proposals, allocations, signed commitments). ./profiles, ./decisions, and ./projections are reserved stubs whose real contents land with spec 333/334.

Model

  • EndeavorRequestV1 — structured intake before adoption (ereq_ id). Any entry point (Home request, discussion ask, inbox ask, A2A intent) produces the same request and drives the same machinery.
  • EndeavorV1 — the durable multi-principal Situation (end_ id) pursuing an OutcomeSpecificationV1 (observable success criteria, versioned).
  • CoordinationPlanV1 — the durable shared plan (p-plan:Plan grounding). Revisions are immutable; planContentHash is sha256(JCS(steps + edges + milestones)); adoption is an explicit decision, never implicit; at most one revision is adopted at a time.
  • EndeavorParticipationV1 — a participant's relationship to the Endeavor (role + scope + validity), asserted through invitation/acceptance or allocation/commitment.
  • ContributionProposalV1AllocationDecisionV1ContributionCommitmentV1 — offer, selection, and the participant's signed acceptance. A commitment binds an exact plan revision hash; a stale hash is rejected.

Usage

import {
  initialCoordinationState,
  validateCoordinationCommand,
  applyCoordinationEvent,
  deriveProvenanceInputs,
} from '@agenticprimitives/coordination/core';

let state = initialCoordinationState();
const result = validateCoordinationCommand(state, {
  kind: 'SubmitEndeavorRequest',
  actor: requesterAddress,
  issuedAt: new Date().toISOString(),
  requestId: 'ereq_1',
  targetPrincipal: orgAddress,
  goal: 'Produce the Q3 treasury report',
  entryPoint: 'home-request',
});
if (!result.ok) throw new Error(result.reason);
for (const event of result.events) state = applyCoordinationEvent(state, event);

validateCoordinationCommand rejects before append (fail-closed) and returns the events to persist; applyCoordinationEvent is a pure reducer that enforces monotonic revisions. Replaying the event log always reproduces the state; deriveProvenanceInputs(events) yields a structural summary (entities, activities, agents, correspondsToStep links) a P-Plan/PROV projection can consume.

Invariants (spec 332 §6/§9)

  1. Allocation is never authority. No gate reads an apcoord: record; capable / available / allocated / committed / authorized / performing / satisfied are seven separate facts.
  2. Commitments are signed by the participant against the exact adopted plan revision hash.
  3. Conversation never mutates state. Only signed commands produce events; PlanRejected is the only way a plan proposal dies; unknown command kinds are rejected fail-closed.
  4. One mechanism (ADR-0013): the reducer is the only state-transition path.
  5. Deterministic: ids and timestamps come from commands/events, never from the reducer.

Boundaries

Depends on @agenticprimitives/types, @agenticprimitives/situations (EntityRef, validity, JCS), and @agenticprimitives/ontology (apcoord: IRIs). Never imports fabric/home/a2a/delegation/vault — those layers consume coordination. Vendor adapters (Linear, Jira, Temporal, LangGraph, …) live in external repos; only ExternalObjectBindingV1 (the adapter contract surface) ships here.

Spec

specs/332-coordination-endeavor-core.md · ADR-0054 · golden fixtures in test/fixtures/.