atomic

flowstate-flowstate-platform-epicdm-flowstate-rxdb-d1

Package-local agent skill for @epicdm/flowstate-rxdb-d1.

Tags

Publisher

Versions

1 version published — latest: 0.1.0

  • 0.1.0
    publishedInvalid Date

Skill

flowstate-rxdb-d1 Package Skill

Package: @epicdm/flowstate-rxdb-d1 Repository: flowstate-platform Path: packages/worker-rxdb-d1 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

RxDB D1 Replication Protocol

Status: Active Purpose: Keep client, Durable Object, and shared protocol changes compatible. Scope: packages/worker-rxdb-d1 Trigger: Work on replication client, WebSocket manager, Durable Object pull/push, checkpoints, conflicts, change events, or protocol types. Input: Replication behavior change and expected client/server message contract. Output: Compatible client, shared type, and DO behavior with tests.


Workflow

  1. Start with shared message contracts in src/shared/protocol.ts and checkpoints in src/shared/checkpoint.ts.
  2. Update client behavior under src/client and server behavior under src/durable-object together.
  3. Preserve pull ordering: _modified ascending, then id ascending, with checkpoint { id, modified }.
  4. Do not filter _deleted = 0 in WebSocket pull. RxDB clients need deleted documents to replicate removals.
  5. For push, keep conflict checks based on assumedMasterState and tenant ownership validation through validatePushDocument.
  6. Broadcast successful writes to other clients, not back to the sender unless source behavior explicitly changes.
  7. Add matching tests under tests/client, tests/durable-object, and tests/shared.

Protocol Types

Core message types are pull, pull_response, push, push_response, change, ping, pong, resync, error, auth, and auth_response.

Verification

  • yarn test tests/client
  • yarn test tests/durable-object
  • yarn test tests/shared/protocol.test.ts
  • yarn typecheck

Composition

  • Use flowstate-rxdb-d1-rest-rbac when replication changes touch REST write handling, table resolution, or auth rules.

Package Skill Inventory

worker-rxdb-d1 Skill Inventory

Package: @epicdm/flowstate-rxdb-d1 Purpose: RxDB replication client, tenant worker REST API, D1 secure query/write layer, and Durable Object WebSocket synchronization.

SkillTypeUse WhenSource Anchors
flowstate-rxdb-d1-rest-rbacWorkflowChanging tenant worker REST paths, auth, CLP, ACL, tenant isolation, JSON field conversion, table resolution, or secure query/write behavior.src/worker/index.ts, src/worker/rest-api.ts, src/worker/auth/**, src/worker/table-resolver.ts
flowstate-rxdb-d1-replication-protocolWorkflowChanging RxDB client replication, WebSocket pull/push, checkpoints, conflicts, broadcasts, or protocol message types.src/client/**, src/durable-object/ws-handler.ts, src/shared/protocol.ts, tests/client, tests/durable-object

Composition

  • Compose with flowstate-id-api-tenant-rbac because identity API calls tenant REST collections.
  • Compose with flowstate-mcp-tenant-tool-proxy because MCP collection tools proxy through tenant dispatch.
  • Compose with flowstate-provisioning-queue-lifecycle when provisioning changes tenant worker schema or bundle behavior.

Review Gate

worker-rxdb-d1 Skill Review

Reviewed: 2026-06-30 Result: Pass for local agent use.

Checks

  • Skills cover the package's actual hard edges: REST/RBAC and replication protocol.
  • Source references point to worker, durable object, client, shared protocol, and tests.
  • Skills include concrete invariants that generated lists usually miss.

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/worker-rxdb-d1/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-flowstate-platform-epicdm-flowstate-rxdb-d1 --target <target> --out ./skills

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