flowstate-flowstate-platform-epicdm-obs-hono-middleware
Package-local agent skill for @epicdm/obs-hono-middleware.
Tags
Publisher
Versions
1 version published — latest: 0.1.0
- 0.1.0publishedInvalid Date
Skill
obs-hono-middleware Package Skill
Package: @epicdm/obs-hono-middleware
Repository: flowstate-platform
Path: packages/obs-hono-middleware
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
OBS Hono Middleware Integration Workflow
Status: Active
Purpose: Compose observability middleware consistently across FlowState Hono services.
Scope: packages/obs-hono-middleware
Trigger: A Hono app needs observability, logging config changes, request context, error handling, or health checks.
Input: Service name, project ID, version, env vars, and Hono app integration point.
Output: Mounted middleware suite with tested logging and health behavior.
Workflow
- Create a suite with
createObsHonoMiddleware(options)fromsrc/middleware.ts. It returnsobsContext,requestLogger,errorHandler,logger, andhealthCheck. - Resolve env-driven options with
resolveConfigFromEnv(env)when a package has Cloudflare-styleOBS_*variables. OverrideserviceNameandversionexplicitly when needed. - Mount context before request logging so
createRequestLoggerreceives request IDs and service context. - Use
logger.withContext()for route-specific fields instead of rebuilding ad hoc log payloads. - Call
logger.flush()in tests or shutdown-sensitive paths when assertions depend on buffered remote transport. - Before changing public types or return shape, check consumers with
rg "@epicdm/obs-hono-middleware" packages --glob '!**/node_modules/**'.
Verification
yarn workspace @epicdm/obs-hono-middleware testyarn workspace @epicdm/obs-hono-middleware typecheck
Configuration Reference
| Env | Meaning |
|---|---|
OBS_PROJECT_ID | Project identifier; defaults to unknown. |
OBS_API_KEY | Enables remote log transport when present. |
OBS_SERVER_URL | Remote observability endpoint. |
OBS_LOG_LEVEL | Minimum log level, default info. |
OBS_ENABLED | Set to false to disable remote transport. |
OBS_BATCH_SIZE | Buffered log batch size. |
OBS_FLUSH_INTERVAL | Flush interval in milliseconds. |
Composition
- Use worker package skills for route-specific logging decisions.
- Use
flowstate-api-core-worker-api-workflowwhen the Hono app also uses the shared API factory.
Package Skill Inventory
Skill Inventory: @epicdm/obs-hono-middleware
Created Skills
| Skill | Type | Trigger |
|---|---|---|
obs-hono-middleware-integration-workflow | Workflow | Use when integrating or changing FlowState Hono observability middleware. |
Candidate Future Skills
| Candidate | Reason to Split Later |
|---|---|
obs-hono-middleware-transport | Remote transport retry/failure behavior may need a troubleshooting reference. |
obs-hono-middleware-request-context | Request IDs and context propagation may become a cross-worker pattern. |
Source Evidence
src/middleware.tscomposes the suite.src/config.tsresolves explicit options andOBS_*env values.src/logger.tsimplements batching, console logging, remote send, flush, andwithContext.src/__tests__/*verifies the package contract.
Review Gate
Review: @epicdm/obs-hono-middleware Skills
Result: Pass for source-backed package-local workflow guidance.
Checks
- The skill teaches integration and mutation points, not a generated export list.
- It cites suite composition, config, logger, and downstream callers.
- Verification commands are package-local and lightweight.
- Generated
.flowstate/dojofiles were not modified.
Residual Risk
Transport delivery semantics may deserve a deeper skill if retry/backoff behavior is added.
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/obs-hono-middleware/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-obs-hono-middleware --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.