@aikitstudio/agul-core
v0.1.0
Published
OpenAPI parser and route generator for AGUL
Maintainers
Readme
@aikitstudio/agul-core
The framework-free half of AGUL: parses OpenAPI 3.x / Swagger 2.0, groups endpoints into resources (list / detail / create / update / delete), decides how every operation is shown (CRUD, action, chat, hidden), and filters it by what the user may do. No React dependency.
npm install @aikitstudio/agul-coreimport { parseOpenAPISync, planUi, grantsFromClaims, decodeJwt } from '@aikitstudio/agul-core';
const api = parseOpenAPISync(spec);
const plan = planUi(api, undefined, { grants: grantsFromClaims(decodeJwt(accessToken)) });
plan.resources; // CRUD resources with router paths and dereferenced schemas
plan.pages; // action and chat pages
plan.menu; // sidebar grouped by tagAlso: createLlmDecisionProvider / createHttpDecisionProvider (let an LLM choose the layout),
summarizeOperations, DECISION_JSON_SCHEMA, buildListApiUrl, canAccessEndpoint.
React components: @aikitstudio/agul-react. MIT
