@qxk24/sdk
v1.0.0
Published
QXK24 Constitutional Kernel SDK — Alamtologi Framework by Masa Bayu
Downloads
169
Maintainers
Readme
@qxk24/sdk
JavaScript/TypeScript SDK for the QXK24 constitutional kernel on api.qiubbx.com.
Install
npm install @qxk24/sdkQuick start
import { QXK24 } from '@qxk24/sdk';
QXK24.configure({
auth: {
type: 'jwt',
getToken: () => localStorage.getItem('qiubbx_token') ?? '',
},
appSource: 'QMS-Web',
});
const heartbeat = await QXK24.heartbeat();
console.log(heartbeat.bridgeStatus, heartbeat.era);
const decision = await QXK24.govern({
flow: 'ORDER_MANAGEMENT',
action: 'UPDATE_STATUS',
context: {
userId: 'user-1',
userRole: 'ADMIN',
module: 'Commerce',
},
});
if (decision.decision === 'ALLOW') {
// proceed
}
await QXK24.governedPerform({
flow: 'USER_MANAGEMENT',
action: 'SUSPEND_USER',
context: { userId: 'u1', userRole: 'ADMIN', module: 'Users' },
work: async () => suspendUserOnServer(),
});Auth
| Type | Status | Header |
|------|--------|--------|
| jwt | Live | Authorization: Bearer <token> |
| apikey | Reserved | Authorization: ApiKey <key> (covenant keys — backend TBD) |
Endpoints
| Method | Path |
|--------|------|
| POST | /api/constitutional/govern |
| GET | /api/constitutional/status |
| GET | /api/qms/engine/heartbeat |
| GET | /api/qms/engine/status |
| POST | /api/qms/audit/sync |
License
Apache-2.0 — Masa Bayu
