heady-core 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @heady/core
|
|
2
|
+
|
|
3
|
+
> Core utilities and shared primitives for the Heady™ AI Platform.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @heady/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## API
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
const { HeadyError, validateUserId, HEADY_VERSION } = require('@heady/core');
|
|
15
|
+
|
|
16
|
+
// Validate user IDs
|
|
17
|
+
validateUserId('my-user'); // true
|
|
18
|
+
|
|
19
|
+
// Structured error handling
|
|
20
|
+
throw new HeadyError('Something broke', 'MY_CODE');
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## What's Inside
|
|
24
|
+
|
|
25
|
+
| Export | Description |
|
|
26
|
+
|--------|-------------|
|
|
27
|
+
| `HEADY_VERSION` | Current platform version string |
|
|
28
|
+
| `HeadyConfig` | Configuration interface (TypeScript) |
|
|
29
|
+
| `HeadyError` | Error class with structured codes |
|
|
30
|
+
| `validateUserId()` | User ID format validator |
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
Proprietary — © 2026 HeadySystems Inc.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const HEADY_VERSION = "3.2.0";
|
|
2
|
+
export interface HeadyConfig {
|
|
3
|
+
userId: string;
|
|
4
|
+
domain: string;
|
|
5
|
+
vectorDimension: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class HeadyError extends Error {
|
|
8
|
+
code: string;
|
|
9
|
+
constructor(message: string, code: string);
|
|
10
|
+
}
|
|
11
|
+
export declare function validateUserId(userId: string): boolean;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,UAAW,SAAQ,KAAK;IACC,IAAI,EAAE,MAAM;gBAApC,OAAO,EAAE,MAAM,EAAS,IAAI,EAAE,MAAM;CAIjD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeadyError = exports.HEADY_VERSION = void 0;
|
|
4
|
+
exports.validateUserId = validateUserId;
|
|
5
|
+
exports.HEADY_VERSION = '3.2.0';
|
|
6
|
+
class HeadyError extends Error {
|
|
7
|
+
code;
|
|
8
|
+
constructor(message, code) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.code = code;
|
|
11
|
+
this.name = 'HeadyError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.HeadyError = HeadyError;
|
|
15
|
+
function validateUserId(userId) {
|
|
16
|
+
return userId.length > 0 && /^[a-zA-Z0-9_-]+$/.test(userId);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAeA,wCAEC;AAjBY,QAAA,aAAa,GAAG,OAAO,CAAC;AAQrC,MAAa,UAAW,SAAQ,KAAK;IACC;IAApC,YAAY,OAAe,EAAS,IAAY;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,SAAI,GAAJ,IAAI,CAAQ;QAE9C,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AALD,gCAKC;AAED,SAAgB,cAAc,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heady-core",
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "Core utilities, config, and shared primitives for the Heady AI Platform — zero-dependency foundation module.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"require": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"dev": "tsc --watch",
|
|
20
|
+
"clean": "rm -rf dist",
|
|
21
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
22
|
+
},
|
|
23
|
+
"license": "UNLICENSED",
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "HeadySystems Inc.",
|
|
26
|
+
"email": "eric@headyconnection.org",
|
|
27
|
+
"url": "https://headyme.com"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/HeadyMe/heady-production.git",
|
|
32
|
+
"directory": "packages/core"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://headysystems.com",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/HeadyMe/heady-production/issues"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"heady",
|
|
40
|
+
"ai",
|
|
41
|
+
"core",
|
|
42
|
+
"utilities",
|
|
43
|
+
"multi-agent",
|
|
44
|
+
"headysystems"
|
|
45
|
+
],
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=20.0.0"
|
|
48
|
+
}
|
|
49
|
+
}
|