atomic

flowstate-flowstate-platform-epicdm-worker-marketplace-api

Package-local agent skill for @epicdm/worker-marketplace-api.

Tags

Publisher

Versions

1 version published — latest: 1.0.0

  • 1.0.0
    publishedInvalid Date

Skill

worker-marketplace-api Package Skill

Package: @epicdm/worker-marketplace-api Repository: flowstate-platform Path: packages/worker-marketplace-api Version: 1.0.0

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

Primary Package Workflow

Marketplace Developer And Cron

Status: Active Purpose: Guide changes to marketplace account lifecycle and scheduled maintenance. Scope: packages/worker-marketplace-api Trigger: Developer enrollment/account/signing-key, webhook, admin, federation, purchase, or cron work. Input: Target route or scheduled job behavior. Output: Route, middleware, query, and scheduled tests that keep marketplace state consistent.


Workflow

  1. Start at src/index.ts to locate route mounting, middleware, and scheduled cron expressions.
  2. For developer routes, pair src/routes/developer-*.ts with matching schemas and DB query helpers.
  3. For protected routes, preserve middleware placement: developer auth in route modules, webhook HMAC under /webhooks/*, cron auth under /cron/*, and admin middleware under /admin.
  4. For scheduled work, keep failures isolated. Existing cron code uses ctx.waitUntil and catches federation cache cleanup errors so one job does not block others.
  5. Update tests near the changed surface: route tests under test/routes, DB helper tests under test/db, and test/scheduled.test.ts for cron behavior.

Cron Map

ScheduleBehaviorSource
*/5 * * * *Expire stale purchases and enrollmentssrc/index.ts, src/lib/cron/expire-*
0 * * * *Sync download counters from KV to D1src/lib/cron/sync-downloads
5 0 * * *Aggregate daily install metricssrc/lib/cron/aggregate-daily-metrics
15 * * * *Clean federation cachesrc/db/queries/vsx-queries

Verification

  • yarn test test/routes/<route>.test.ts
  • yarn test test/db/<helper>.test.ts
  • yarn test test/scheduled.test.ts
  • yarn typecheck

Composition

  • Use flowstate-marketplace-publish-pipeline for archive upload and version publication.

Package Skill Inventory

worker-marketplace-api Skill Inventory

Package: @epicdm/worker-marketplace-api Purpose: Marketplace listings, publishing, developer enrollment, reviews, purchases, VSX compatibility, webhooks, and cron maintenance.

SkillTypeUse WhenSource Anchors
flowstate-marketplace-publish-pipelineWorkflowChanging archive upload, signature verification, app version creation, review, R2 write, or cache invalidation.src/lib/publish-pipeline.ts, src/routes/publishing.ts, src/routes/developer-upload-put.ts, src/lib/upload-verify.ts, test/lib/publish-pipeline.test.ts
flowstate-marketplace-developer-and-cronWorkflowChanging developer enrollment/account flows, webhook auth, admin/federation maintenance, or scheduled jobs.src/index.ts, src/routes/developer-*.ts, src/routes/cron.ts, src/middleware/*.ts, test/routes/*.test.ts, test/scheduled.test.ts

Composition

  • Compose with flowstate-payment-x402-provisioning when marketplace purchases depend on payment records or course purchase behavior.
  • Compose with flowstate-mcp-tool-registry if marketplace operations are exposed through MCP later.

Exclusions

  • Do not create separate skills for every public list route; route shape is straightforward and well covered by tests.
  • Do not update .flowstate/dojo in this pass.

Review Gate

worker-marketplace-api Skill Review

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

Checks

  • Skills focus on real operational workflows: publish pipeline and developer/cron lifecycle.
  • Source paths include route callers, DB schema, middleware, library helpers, and tests.
  • Skills avoid generated feature inventory copying.

Follow-up

  • Add a focused skill if future federation logic grows beyond admin/cron maintenance.

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-marketplace-api/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-worker-marketplace-api --target <target> --out ./skills

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