@aethellayer/sdk
v0.2.4
Published
AethelLayer CLI probe and MCP server. Catch Docker OOM / API dropouts, log them locally, draft GitHub tickets, and expose get_recent_errors to Cursor and Claude.
Maintainers
Readme
@aethellayer/sdk
Probe for AethelLayer. Catch silent CLI, SDK, and API failures and open a thread in the developer inbox.
Try it
No account. This wraps a command that exits 1, writes ~/.aethellayer/errors.json, and prints a drafted GitHub issue URL.
npx --yes @aethellayer/sdk run -- falsenpx aethel is a different npm package. Use the command above.
Install
npm i @aethellayer/sdk
# or
pnpm add @aethellayer/sdk
# or
yarn add @aethellayer/sdkexport AETHEL_API_KEY=aethel_live_...Quick start
Express
import { Aethel } from "@aethellayer/sdk";
const aethel = new Aethel({
apiKey: process.env.AETHEL_API_KEY!,
environment: "api_middleware",
});
app.use(aethel.express());Next.js (instrumentation.ts)
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
const { Aethel } = await import("@aethellayer/sdk");
new Aethel({ apiKey: process.env.AETHEL_API_KEY! }).next();
}
}What you can see after install
npm install does not phone home. The first time a process runs new Aethel(...) or aethel run with AETHEL_API_KEY, the SDK posts one start signal to https://www.aethellayer.com/api/v1/signals. That signal records the workspace, SDK version, runtime, and environment. It does not open an inbox thread and it does not spend probe quota. Failures still go to /api/v1/probes.
Super admins read both streams at /dashboard/fleet.
CLI probe
Wraps a command, tees stderr, classifies Docker OOM (exit 137) and API dropouts, asks what you were doing (TTY only), writes ~/.aethellayer/errors.json, drafts a GitHub issue URL, and posts to AethelLayer when AETHEL_API_KEY is set.
npx aethel is a different npm package. Do not use --package=… aethel — npm will look for aethel on PATH and fail with command not found. Use the scoped package as the command:
npx --yes @aethellayer/sdk init
npx --yes @aethellayer/sdk run -- npm start
npx --yes @aethellayer/sdk run -- falseMCP server (Cursor / Claude Desktop)
Same log file. Tools: get_recent_errors, draft_github_ticket. No-arg stdio launch starts MCP (so Cursor can run the package directly).
npx --yes @aethellayer/sdk mcpmcp.json / claude_desktop_config.json:
{
"mcpServers": {
"aethellayer": {
"command": "npx",
"args": ["-y", "@aethellayer/sdk"]
}
}
}Publish (maintainers)
Publish this package only. Do not run npm publish from the repo root (aeth is private and is the Next.js app).
You must be logged in as the npm user aethellayer (publisher of 0.1.0). A 404 on PUT @aethellayer/sdk means the token is missing, expired, or belongs to a different user — npm hides that as 404 for scoped packages.
npm login
npm whoami # must print: aethellayer
cd packages/sdk
npm publish --access publicIf npm login succeeds but publish still 404s, create a granular token at https://www.npmjs.com/settings/aethellayer/tokens with Read and write on the @aethellayer scope, then:
npm config set //registry.npmjs.org/:_authToken YOUR_TOKENUntil this package is published, install from the workspace:
npm i ./packages/sdkSite: https://aethellayer.com · https://aethellayer.com/llms.txt
