flowstate-epic-flowstate-community-epicdm-flowstate-auth-core
Package-local agent skill for @epicdm/flowstate-auth-core.
Tags
Publisher
Versions
1 version published — latest: 1.0.8
- 1.0.8publishedInvalid Date
Skill
flowstate-auth-core Package Skill
Package: @epicdm/flowstate-auth-core
Repository: epic-flowstate-community
Path: packages/flowstate-auth-core
Version: 1.0.8
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
CLI Profile Auth
Use this skill when changing CLIAuthService, ConfigManager, StoredAuth, server profiles, or getValidAccessToken.
ConfigManager
ConfigManager reads and writes:
~/.flowstate/config.json
The directory is created with 0700 and config file with 0600.
Tests and examples should inject new ConfigManager(tempDir) instead of writing to the real home directory.
ServerProfile Fields
Important fields include:
urldomainIdauthUrlforapi_tokengrantoauthTokenUrlandoauthClientIdfor OAuth refreshmcpUrlauth
getValidAccessToken
Refresh order:
- Return current access token when it has at least 60 seconds remaining.
- Exchange
serviceTokenatauthUrlwithgrant_type=api_token. - Exchange OAuth
refreshTokenatoauthTokenUrlwith form-encodedgrant_type=refresh_token. - Use legacy local
{profile.url}/auth/refreshJSON body when only local refresh material exists.
The legacy path intentionally does not migrate the profile to OAuth token URL because local deployments may reject the OAuth client.
Watch Outs
- Error messages include login hints; keep them user-facing.
- Persist refreshed auth back to the same server profile.
- Do not flatten all refresh flows into one generic refresh-token path.
Package Skill Inventory
Package Skill Inventory: @epicdm/flowstate-auth-core
Package path: packages/flowstate-auth-core.
Skill Map
| Skill | Type | Trigger | Teaches | Dojo |
|---|---|---|---|---|
flowstate-auth-core | orchestrator | Use when a task touches @epicdm/flowstate-auth-core or shared auth contracts | Package purpose, routing, public export boundaries | local-only |
flowstate-auth-core-token-workflows | workflow | Use when issuing/verifying access, refresh, service, API tokens, or JWKS | TokenManager, key loading, service token scopes, API token hashing, public JWK export | ready-after-review |
flowstate-auth-core-storage-adapters | workflow/reference | Use when adding, using, or testing an auth storage adapter | AuthStorageAdapter, D1/RxDB/memory/filesystem behavior, cross-org grants, error semantics | ready-after-review |
flowstate-auth-core-cli-profile-auth | workflow | Use when changing CLI/MCP/server profile login or token refresh behavior | CLIAuthService, ConfigManager, getValidAccessToken, profile fields, refresh paths | ready-after-review |
flowstate-auth-core-contract-reference | reference | Use when checking exact schema/config/API/backend naming contracts | Domain schemas, collection names, env vars, exported types, compatibility warnings | ready-after-review |
Anti-Sprawl Decision
Do not create one skill per schema, helper, error class, or adapter method. The real workflows are token management, storage adapter contracts, CLI profile auth, and contract lookup.
Review Gate
Package Skill Review: @epicdm/flowstate-auth-core
Package path: packages/flowstate-auth-core.
Review Result
Status: drafted, source-backed, verified, pending publication.
The skillset is workflow-shaped around token workflows, storage adapter contracts, CLI profile auth, and auth contract references.
Checks
- Source review: completed from exports, token manager, storage adapter interface, config manager, token refresh helper, downstream references, and generated artifact drift.
- Skill inventory: completed.
- Skill files: completed.
- ASCII/frontmatter scan: passed.
- Package tests: passed, 18 suites and 261 tests.
- Package typecheck: passed.
- Package build: passed.
- Package lint: passed with 244 existing warnings.
- Generated Dojo replacement: pending.
- Cloud Dojo publication: pending.
Verification Commands
Run before publication:
yarn workspace @epicdm/flowstate-auth-core test
yarn workspace @epicdm/flowstate-auth-core typecheck
yarn workspace @epicdm/flowstate-auth-core build
yarn workspace @epicdm/flowstate-auth-core lint
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-auth-core/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-auth-core --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.