atomic

flowstate-epic-flowstate-community-epicdm-flowstate-peer-sync

Package-local agent skill for @epicdm/flowstate-peer-sync.

Tags

Publisher

Versions

1 version published — latest: 0.1.0

  • 0.1.0
    publishedInvalid Date

Skill

flowstate-peer-sync Package Skill

Package: @epicdm/flowstate-peer-sync Repository: epic-flowstate-community Path: packages/flowstate-peer-sync Version: 0.1.0

Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.

Primary Package Workflow

Peer Sync Contract Reference

Use this skill when exact peer-sync contracts matter.

Public Exports

Key exports include:

  • PeerSyncManager
  • PeerRegistry
  • PeerConnection
  • ReplicationLoop
  • PullScheduler
  • PushAccumulator
  • stampSyncOrigin
  • shouldPushToRemote
  • getSyncOrigin
  • getBootstrapOrder
  • isInstanceLocal
  • getSyncableCollections
  • HealthMonitor
  • HealthServer
  • config/types/constants

Runtime Endpoints

  • /health
  • /peers
  • /metrics

Required Env Vars

  • RXDB_SERVER_URL or D1_URL
  • PEER_SYNC_TOKEN or AUTH_TOKEN

Known Caveats

  • Direction fields are present but not behavior gates.
  • Metrics can underreport if connection metrics are not updated by pull/push paths.
  • Checkpoint save failure causes re-pull.
  • Node runtime must provide global WebSocket unless the implementation changes to use imported ws.

Verification

yarn workspace @epicdm/flowstate-peer-sync typecheck
yarn workspace @epicdm/flowstate-peer-sync test
yarn workspace @epicdm/flowstate-peer-sync test:coverage
yarn nx build @epicdm/flowstate-peer-sync

Package Skill Inventory

Package Skill Inventory: @epicdm/flowstate-peer-sync

Package path: packages/flowstate-peer-sync.

Skill Map

SkillTypeTriggerTeachesDojo
flowstate-peer-syncorchestratorUse when a task touches peer-sync service, package exports, Docker runtime, or peer replication behaviorPackage purpose, routing, public surfaces, verificationlocal-only
flowstate-peer-sync-service-opsworkflowUse when starting, configuring, debugging, or containerizing peer-syncEnv vars, server entry, Docker health endpoints, graceful shutdownready-after-review
flowstate-peer-sync-replication-flowworkflowUse when changing pull/push/bootstrap/checkpoint behaviorRegistry to connection to loop, collection ordering, checkpoints, live pull, push batchingready-after-review
flowstate-peer-sync-filtering-and-originworkflow/referenceUse when changing sync filters, redaction, secrets, or mesh dedupefilterMode, sensitive defaults, field redaction, _syncOrigin, auth header choicesready-after-review
flowstate-peer-sync-contract-referencereferenceUse when checking exact public APIs, env vars, endpoints, collection exclusions, or test/ops contractsExports, config, REST endpoints, constants, known caveatsready-after-review

Anti-Sprawl Decision

Do not create standalone skills for constants, HealthMonitor, HealthServer, BootstrapOrder, PushAccumulator, or individual helpers. They are useful inside service operations, replication flow, filtering/origin, and contract reference skills.

Review Gate

Package Skill Review: @epicdm/flowstate-peer-sync

Package path: packages/flowstate-peer-sync.

Review Result

Status: drafted, source-backed, verified with one package-script lint blocker, pending publication.

The skillset is workflow-shaped around service operations, replication flow, filtering/origin behavior, and compact contract reference.

Checks

  • Source review: completed from exports, server entry, manager, replication loop, filters, origin helpers, health server, Docker references, and generated artifact drift.
  • Skill inventory: completed.
  • Skill files: completed.
  • Verification: completed.
  • Generated Dojo replacement: pending.
  • Cloud Dojo publication: pending.

Verification Commands

Commands run:

yarn workspace @epicdm/flowstate-peer-sync test --runInBand
yarn workspace @epicdm/flowstate-peer-sync typecheck
yarn workspace @epicdm/flowstate-peer-sync lint
yarn nx build @epicdm/flowstate-peer-sync

Results:

  • Skill file ASCII scan passed.
  • Tests passed: 8 suites passed, 1 skipped; 64 tests passed, 9 skipped.
  • Typecheck passed.
  • Build passed.
  • Lint did not run because the package script resolved eslint as missing: command not found: eslint.

Optional runtime smoke:

cd docker && docker compose -f docker-compose.core.yml up -d d1-worker peer-sync
curl -fsS http://127.0.0.1:3104/health
curl -fsS http://127.0.0.1:3104/peers
curl -fsS http://127.0.0.1:3104/metrics

Publication Gate

Do not publish existing .flowstate/dojo artifacts until they are rebuilt from reviewed package skills.

Usage

Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-peer-sync/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.

Install

Run this in your project to install via CLI:

fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-peer-sync --target <target> --out ./skills

Replace <target> with your agent target identifier. See the CLI docs for details.