@aibvf/core 0.1.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 +49 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +50 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +31 -0
- package/dist/schema.js.map +1 -0
- package/dist/score.d.ts +52 -0
- package/dist/score.d.ts.map +1 -0
- package/dist/score.js +95 -0
- package/dist/score.js.map +1 -0
- package/dist/taxonomy.d.ts +8 -0
- package/dist/taxonomy.d.ts.map +1 -0
- package/dist/taxonomy.js +25 -0
- package/dist/taxonomy.js.map +1 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +7 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +93 -0
- package/dist/validate.js.map +1 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @aibvf/core
|
|
2
|
+
|
|
3
|
+
AI BVF v1.0 — open protocol for scoring AI investments. Validator and scoring engine.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @aibvf/core
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Validate a portfolio
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { validate } from '@aibvf/core';
|
|
13
|
+
|
|
14
|
+
const result = validate(portfolioJson);
|
|
15
|
+
if (!result.valid) console.error(result.errors);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Score an initiative
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { score } from '@aibvf/core';
|
|
22
|
+
|
|
23
|
+
const r = score({
|
|
24
|
+
industry: 'manufacturing',
|
|
25
|
+
revenue_eur: 2_400_000_000,
|
|
26
|
+
function: 'supply',
|
|
27
|
+
ai_tier: 'gen2',
|
|
28
|
+
readiness: 'traditional',
|
|
29
|
+
scores: {
|
|
30
|
+
strategic_alignment: 72,
|
|
31
|
+
financial_return: 64,
|
|
32
|
+
change_enablement: 48,
|
|
33
|
+
governance_risk: 35,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
console.log(r.classification); // 'Fix'
|
|
38
|
+
console.log(r.net_low_eur); // ~75.6M
|
|
39
|
+
console.log(r.net_high_eur); // ~247M
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Spec
|
|
43
|
+
|
|
44
|
+
Full specification at [bvf-app.vercel.app/protocol](https://bvf-app.vercel.app/protocol).
|
|
45
|
+
JSON Schema at [bvf-app.vercel.app/bvf-protocol.schema.json](https://bvf-app.vercel.app/bvf-protocol.schema.json).
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
MIT. The underlying specification is CC-BY-4.0.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { validate } from './validate.js';
|
|
2
|
+
export { score, BASE_RATES, IND_MULT, TIER_ADJ, READINESS_CAPTURE } from './score.js';
|
|
3
|
+
export { bvfSchema } from './schema.js';
|
|
4
|
+
export { INDUSTRIES, FUNCTIONS, AI_TIERS, READINESS, INDUSTRY_LABEL, FUNCTION_LABEL, TIER_LABEL } from './taxonomy.js';
|
|
5
|
+
export type * from './types.js';
|
|
6
|
+
export declare const BVF_VERSION = "1.0";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvH,mBAAmB,YAAY,CAAC;AAEhC,eAAO,MAAM,WAAW,QAAQ,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { validate } from './validate.js';
|
|
2
|
+
export { score, BASE_RATES, IND_MULT, TIER_ADJ, READINESS_CAPTURE } from './score.js';
|
|
3
|
+
export { bvfSchema } from './schema.js';
|
|
4
|
+
export { INDUSTRIES, FUNCTIONS, AI_TIERS, READINESS, INDUSTRY_LABEL, FUNCTION_LABEL, TIER_LABEL } from './taxonomy.js';
|
|
5
|
+
export const BVF_VERSION = '1.0';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGvH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC"}
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical AI BVF v1.0 JSON Schema, embedded for zero-IO access.
|
|
3
|
+
* Mirror of spec/bvf-protocol.schema.json at the root of this monorepo.
|
|
4
|
+
*/
|
|
5
|
+
export declare const bvfSchema: {
|
|
6
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
7
|
+
readonly $id: "https://bvf-app.vercel.app/bvf-protocol.schema.json";
|
|
8
|
+
readonly title: "AI BVF Portfolio v1.0";
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly required: readonly ["bvf_version", "organization", "initiatives"];
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly bvf_version: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly const: "1.0";
|
|
15
|
+
};
|
|
16
|
+
readonly generated_at: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly format: "date-time";
|
|
19
|
+
};
|
|
20
|
+
readonly organization: {
|
|
21
|
+
readonly type: "object";
|
|
22
|
+
readonly required: readonly ["name", "industry"];
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly name: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
};
|
|
27
|
+
readonly industry: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly enum: readonly ["universal", "creative", "education", "energy", "financial", "healthcare", "logistics", "manufacturing", "nonprofit", "professional", "public_sector", "real_estate", "retail", "technology"];
|
|
30
|
+
};
|
|
31
|
+
readonly region: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly revenue_eur: {
|
|
35
|
+
readonly type: "number";
|
|
36
|
+
readonly minimum: 0;
|
|
37
|
+
};
|
|
38
|
+
readonly headcount: {
|
|
39
|
+
readonly type: "integer";
|
|
40
|
+
readonly minimum: 0;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly initiatives: {
|
|
45
|
+
readonly type: "array";
|
|
46
|
+
readonly minItems: 1;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBZ,CAAC"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical AI BVF v1.0 JSON Schema, embedded for zero-IO access.
|
|
3
|
+
* Mirror of spec/bvf-protocol.schema.json at the root of this monorepo.
|
|
4
|
+
*/
|
|
5
|
+
export const bvfSchema = {
|
|
6
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
7
|
+
$id: 'https://bvf-app.vercel.app/bvf-protocol.schema.json',
|
|
8
|
+
title: 'AI BVF Portfolio v1.0',
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['bvf_version', 'organization', 'initiatives'],
|
|
11
|
+
properties: {
|
|
12
|
+
bvf_version: { type: 'string', const: '1.0' },
|
|
13
|
+
generated_at: { type: 'string', format: 'date-time' },
|
|
14
|
+
organization: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
required: ['name', 'industry'],
|
|
17
|
+
properties: {
|
|
18
|
+
name: { type: 'string' },
|
|
19
|
+
industry: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
enum: ['universal', 'creative', 'education', 'energy', 'financial', 'healthcare', 'logistics', 'manufacturing', 'nonprofit', 'professional', 'public_sector', 'real_estate', 'retail', 'technology'],
|
|
22
|
+
},
|
|
23
|
+
region: { type: 'string' },
|
|
24
|
+
revenue_eur: { type: 'number', minimum: 0 },
|
|
25
|
+
headcount: { type: 'integer', minimum: 0 },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
initiatives: { type: 'array', minItems: 1 },
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[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
|
4
|
+
lo: number;
|
|
5
|
+
hi: number;
|
|
6
|
+
};
|
|
7
|
+
cost: {
|
|
8
|
+
lo: number;
|
|
9
|
+
hi: number;
|
|
10
|
+
};
|
|
11
|
+
drivers: string[];
|
|
12
|
+
source: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Published benchmark ranges, by business function.
|
|
16
|
+
* Rates are fractions of annual revenue (lo/hi).
|
|
17
|
+
* Sources: McKinsey Global Institute, Gartner, BCG, Deloitte, Forrester, Accenture, ServiceNow.
|
|
18
|
+
*/
|
|
19
|
+
export declare const BASE_RATES: Record<string, BaseRate>;
|
|
20
|
+
/**
|
|
21
|
+
* Industry-by-function multipliers. Values < 1 mean below-average uplift; > 1 above-average.
|
|
22
|
+
*/
|
|
23
|
+
export declare const IND_MULT: Record<string, Record<string, number>>;
|
|
24
|
+
export declare const TIER_ADJ: {
|
|
25
|
+
readonly gen1: 0.55;
|
|
26
|
+
readonly gen2: 1;
|
|
27
|
+
readonly gen3: 1.35;
|
|
28
|
+
};
|
|
29
|
+
export declare const READINESS_CAPTURE: {
|
|
30
|
+
readonly agile: {
|
|
31
|
+
readonly low: 0.85;
|
|
32
|
+
readonly high: 1;
|
|
33
|
+
readonly label: "Agile & Collaborative";
|
|
34
|
+
};
|
|
35
|
+
readonly traditional: {
|
|
36
|
+
readonly low: 0.5;
|
|
37
|
+
readonly high: 0.7;
|
|
38
|
+
readonly label: "Traditional Hierarchy";
|
|
39
|
+
};
|
|
40
|
+
readonly siloed: {
|
|
41
|
+
readonly low: 0.25;
|
|
42
|
+
readonly high: 0.4;
|
|
43
|
+
readonly label: "Siloed & Bureaucratic";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Score an initiative according to AI BVF v1.0.
|
|
48
|
+
* Deterministic. No network. No dependencies.
|
|
49
|
+
*/
|
|
50
|
+
export declare function score(input: ScoreInput): ScoreResult;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=score.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAkB,MAAM,YAAY,CAAC;AAE1E,UAAU,QAAQ;IAChB,GAAG,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAS/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe3D,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAAkD,CAAC;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAIpB,CAAC;AAiBX;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAgCpD"}
|
package/dist/score.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Published benchmark ranges, by business function.
|
|
3
|
+
* Rates are fractions of annual revenue (lo/hi).
|
|
4
|
+
* Sources: McKinsey Global Institute, Gartner, BCG, Deloitte, Forrester, Accenture, ServiceNow.
|
|
5
|
+
*/
|
|
6
|
+
export const BASE_RATES = {
|
|
7
|
+
finance: { rev: { lo: 0.010, hi: 0.030 }, cost: { lo: 0.030, hi: 0.060 }, drivers: ['Automated financial close (–40% cycle time)', 'AI FP&A & forecasting', 'Anomaly detection reducing write-offs'], source: 'McKinsey Global Institute — Finance AI benchmark' },
|
|
8
|
+
hr: { rev: { lo: 0.005, hi: 0.015 }, cost: { lo: 0.020, hi: 0.040 }, drivers: ['Attrition reduction (–15–25% replacement cost)', 'GenAI HR service desk (–30% AHT)', 'Skills-based talent deployment'], source: 'Deloitte Future of Work 2024' },
|
|
9
|
+
sales: { rev: { lo: 0.030, hi: 0.080 }, cost: { lo: 0.010, hi: 0.025 }, drivers: ['Hyper-personalisation at scale', 'Predictive lead scoring & pipeline accuracy', 'AI deal coaching'], source: 'McKinsey — AI personalisation drives up to 40% revenue uplift' },
|
|
10
|
+
supply: { rev: { lo: 0.005, hi: 0.015 }, cost: { lo: 0.040, hi: 0.090 }, drivers: ['Predictive maintenance (–10–25% unplanned downtime)', 'Inventory optimisation (–15% holding cost)', 'Quality defect AI (–20% rework)'], source: 'Gartner Supply Chain AI Benchmark 2024' },
|
|
11
|
+
cx: { rev: { lo: 0.020, hi: 0.050 }, cost: { lo: 0.020, hi: 0.050 }, drivers: ['GenAI deflection (up to 87% self-service)', 'AHT reduction –20–35%', 'Retention uplift from personalisation'], source: 'Forrester CX AI Impact 2024' },
|
|
12
|
+
risk: { rev: { lo: 0.005, hi: 0.010 }, cost: { lo: 0.020, hi: 0.040 }, drivers: ['AML false-positive reduction –30–50%', 'Automated CSRD / EU AI Act reporting', 'Continuous compliance monitoring'], source: 'Accenture Regulatory AI Report 2024' },
|
|
13
|
+
it: { rev: { lo: 0.005, hi: 0.015 }, cost: { lo: 0.030, hi: 0.070 }, drivers: ['MTTR reduction –20–40%', 'AIOps incident prevention', 'GenAI ITSM auto-resolution'], source: 'ServiceNow Platform Value Report 2024' },
|
|
14
|
+
rd: { rev: { lo: 0.010, hi: 0.040 }, cost: { lo: 0.010, hi: 0.030 }, drivers: ['Compressed time-to-market (–20–35% dev cycle)', 'AI-assisted design & simulation', 'IP analysis'], source: 'BCG — AI in R&D: The Next Frontier 2024' },
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Industry-by-function multipliers. Values < 1 mean below-average uplift; > 1 above-average.
|
|
18
|
+
*/
|
|
19
|
+
export const IND_MULT = {
|
|
20
|
+
universal: { finance: 1.0, hr: 1.0, sales: 1.0, supply: 1.0, cx: 1.0, risk: 1.0, it: 1.0, rd: 1.0 },
|
|
21
|
+
creative: { finance: 1.0, hr: 1.0, sales: 1.3, supply: 1.0, cx: 1.3, risk: 1.0, it: 1.0, rd: 1.2 },
|
|
22
|
+
education: { finance: 1.0, hr: 1.2, sales: 1.0, supply: 1.0, cx: 1.0, risk: 1.0, it: 1.2, rd: 1.4 },
|
|
23
|
+
energy: { finance: 1.0, hr: 1.0, sales: 1.0, supply: 1.4, cx: 1.0, risk: 1.3, it: 1.3, rd: 1.0 },
|
|
24
|
+
financial: { finance: 1.4, hr: 1.1, sales: 1.2, supply: 0.7, cx: 1.3, risk: 1.5, it: 1.1, rd: 0.8 },
|
|
25
|
+
healthcare: { finance: 1.1, hr: 1.1, sales: 1.0, supply: 0.8, cx: 1.1, risk: 1.4, it: 1.0, rd: 1.5 },
|
|
26
|
+
logistics: { finance: 1.2, hr: 1.0, sales: 1.0, supply: 1.5, cx: 1.0, risk: 1.0, it: 1.3, rd: 1.0 },
|
|
27
|
+
manufacturing: { finance: 1.0, hr: 1.0, sales: 0.9, supply: 1.4, cx: 0.9, risk: 1.1, it: 1.3, rd: 1.1 },
|
|
28
|
+
nonprofit: { finance: 1.1, hr: 1.2, sales: 1.0, supply: 1.0, cx: 1.2, risk: 1.0, it: 1.0, rd: 1.0 },
|
|
29
|
+
professional: { finance: 1.0, hr: 1.2, sales: 1.4, supply: 1.0, cx: 1.3, risk: 1.0, it: 1.0, rd: 1.0 },
|
|
30
|
+
public_sector: { finance: 1.0, hr: 1.2, sales: 1.0, supply: 1.0, cx: 1.0, risk: 1.3, it: 1.2, rd: 1.0 },
|
|
31
|
+
real_estate: { finance: 1.3, hr: 1.0, sales: 1.2, supply: 1.2, cx: 1.0, risk: 1.0, it: 1.0, rd: 1.0 },
|
|
32
|
+
retail: { finance: 1.0, hr: 1.0, sales: 1.4, supply: 1.2, cx: 1.4, risk: 0.9, it: 1.0, rd: 0.8 },
|
|
33
|
+
technology: { finance: 1.0, hr: 1.1, sales: 1.2, supply: 0.8, cx: 1.1, risk: 1.0, it: 1.4, rd: 1.4 },
|
|
34
|
+
};
|
|
35
|
+
export const TIER_ADJ = { gen1: 0.55, gen2: 1.00, gen3: 1.35 };
|
|
36
|
+
export const READINESS_CAPTURE = {
|
|
37
|
+
agile: { low: 0.85, high: 1.00, label: 'Agile & Collaborative' },
|
|
38
|
+
traditional: { low: 0.50, high: 0.70, label: 'Traditional Hierarchy' },
|
|
39
|
+
siloed: { low: 0.25, high: 0.40, label: 'Siloed & Bureaucratic' },
|
|
40
|
+
};
|
|
41
|
+
function classify(sa, fr, ce, gr) {
|
|
42
|
+
if (gr >= 70 || fr <= 20) {
|
|
43
|
+
return { label: 'Stop', reason: gr >= 70 ? 'Governance risk above the safe threshold.' : 'Financial return too thin to justify scope.' };
|
|
44
|
+
}
|
|
45
|
+
if (sa >= 60 && fr >= 60 && ce >= 60 && gr <= 40) {
|
|
46
|
+
return { label: 'Accelerate', reason: 'All four pillars clear, governance contained. Fund it.' };
|
|
47
|
+
}
|
|
48
|
+
const gaps = [];
|
|
49
|
+
if (sa < 60)
|
|
50
|
+
gaps.push('strategic alignment is weak');
|
|
51
|
+
if (fr < 60)
|
|
52
|
+
gaps.push('financial return is thin');
|
|
53
|
+
if (ce < 60)
|
|
54
|
+
gaps.push('change enablement is a risk');
|
|
55
|
+
if (gr > 40)
|
|
56
|
+
gaps.push('governance exposure is real');
|
|
57
|
+
return { label: 'Fix', reason: `Workable, but ${gaps.join('; ')}. Close the gap before scaling.` };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Score an initiative according to AI BVF v1.0.
|
|
61
|
+
* Deterministic. No network. No dependencies.
|
|
62
|
+
*/
|
|
63
|
+
export function score(input) {
|
|
64
|
+
const { industry, revenue_eur, function: fn, ai_tier, readiness, scores } = input;
|
|
65
|
+
const base = BASE_RATES[fn];
|
|
66
|
+
if (!base)
|
|
67
|
+
throw new Error(`Unknown function: ${fn}`);
|
|
68
|
+
const mult = (IND_MULT[industry] ?? IND_MULT.universal)[fn] ?? 1;
|
|
69
|
+
const tAdj = TIER_ADJ[ai_tier];
|
|
70
|
+
if (tAdj === undefined)
|
|
71
|
+
throw new Error(`Unknown ai_tier: ${ai_tier}`);
|
|
72
|
+
const cap = READINESS_CAPTURE[readiness];
|
|
73
|
+
if (!cap)
|
|
74
|
+
throw new Error(`Unknown readiness: ${readiness}`);
|
|
75
|
+
const { strategic_alignment: sa, financial_return: fr, change_enablement: ce, governance_risk: gr } = scores;
|
|
76
|
+
const grossLo = revenue_eur * (base.rev.lo + base.cost.lo) * mult * tAdj;
|
|
77
|
+
const grossHi = revenue_eur * (base.rev.hi + base.cost.hi) * mult * tAdj;
|
|
78
|
+
const netLo = grossLo * cap.low;
|
|
79
|
+
const netHi = grossHi * cap.high;
|
|
80
|
+
const cls = classify(sa, fr, ce, gr);
|
|
81
|
+
const confidence = Math.round((sa + fr + ce + (100 - gr)) / 4);
|
|
82
|
+
return {
|
|
83
|
+
classification: cls.label,
|
|
84
|
+
reason: cls.reason,
|
|
85
|
+
gross_low_eur: grossLo,
|
|
86
|
+
gross_high_eur: grossHi,
|
|
87
|
+
net_low_eur: netLo,
|
|
88
|
+
net_high_eur: netHi,
|
|
89
|
+
confidence,
|
|
90
|
+
multipliers: { industry: mult, tier: tAdj, capture_low: cap.low, capture_high: cap.high },
|
|
91
|
+
drivers: base.drivers,
|
|
92
|
+
source: base.source,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score.js","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,OAAO,EA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@
|
|
|
1
|
+
export declare const INDUSTRIES: readonly ["universal", "creative", "education", "energy", "financial", "healthcare", "logistics", "manufacturing", "nonprofit", "professional", "public_sector", "real_estate", "retail", "technology"];
|
|
2
|
+
export declare const FUNCTIONS: readonly ["finance", "hr", "sales", "supply", "cx", "risk", "it", "rd"];
|
|
3
|
+
export declare const AI_TIERS: readonly ["gen1", "gen2", "gen3"];
|
|
4
|
+
export declare const READINESS: readonly ["agile", "traditional", "siloed"];
|
|
5
|
+
export declare const INDUSTRY_LABEL: Record<string, string>;
|
|
6
|
+
export declare const FUNCTION_LABEL: Record<string, string>;
|
|
7
|
+
export declare const TIER_LABEL: Record<string, string>;
|
|
8
|
+
//# sourceMappingURL=taxonomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taxonomy.d.ts","sourceRoot":"","sources":["../src/taxonomy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,yMAGb,CAAC;AAEX,eAAO,MAAM,SAAS,yEAAmE,CAAC;AAC1F,eAAO,MAAM,QAAQ,mCAAkC,CAAC;AACxD,eAAO,MAAM,SAAS,6CAA4C,CAAC;AAEnE,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGjD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI7C,CAAC"}
|
package/dist/taxonomy.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const INDUSTRIES = [
|
|
2
|
+
'universal', 'creative', 'education', 'energy', 'financial', 'healthcare', 'logistics',
|
|
3
|
+
'manufacturing', 'nonprofit', 'professional', 'public_sector', 'real_estate', 'retail', 'technology',
|
|
4
|
+
];
|
|
5
|
+
export const FUNCTIONS = ['finance', 'hr', 'sales', 'supply', 'cx', 'risk', 'it', 'rd'];
|
|
6
|
+
export const AI_TIERS = ['gen1', 'gen2', 'gen3'];
|
|
7
|
+
export const READINESS = ['agile', 'traditional', 'siloed'];
|
|
8
|
+
export const INDUSTRY_LABEL = {
|
|
9
|
+
universal: 'Universal / Other', creative: 'Creative & Media', education: 'Education & Research',
|
|
10
|
+
energy: 'Energy & Utilities', financial: 'Financial Services', healthcare: 'Healthcare / MedTech',
|
|
11
|
+
logistics: 'Logistics & Transportation', manufacturing: 'Manufacturing & Supply Chain',
|
|
12
|
+
nonprofit: 'Non-Profit & NGO', professional: 'Professional Services',
|
|
13
|
+
public_sector: 'Public Sector & Government', real_estate: 'Real Estate & Construction',
|
|
14
|
+
retail: 'Retail / Consumer', technology: 'Technology',
|
|
15
|
+
};
|
|
16
|
+
export const FUNCTION_LABEL = {
|
|
17
|
+
finance: 'Finance & CFO', hr: 'HR & Workforce', sales: 'Sales & Revenue', supply: 'Supply Chain',
|
|
18
|
+
cx: 'Customer Experience', risk: 'Risk & Compliance', it: 'IT & Platform', rd: 'R&D / Innovation',
|
|
19
|
+
};
|
|
20
|
+
export const TIER_LABEL = {
|
|
21
|
+
gen1: 'Gen 1 — Automation (RPA)',
|
|
22
|
+
gen2: 'Gen 2 — GenAI',
|
|
23
|
+
gen3: 'Gen 3 — Agentic',
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=taxonomy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taxonomy.js","sourceRoot":"","sources":["../src/taxonomy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW,EAAC,UAAU,EAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAC,YAAY,EAAC,WAAW;IAChF,eAAe,EAAC,WAAW,EAAC,cAAc,EAAC,eAAe,EAAC,aAAa,EAAC,QAAQ,EAAC,YAAY;CACtF,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,CAAU,CAAC;AAC1F,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAU,CAAC;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAO,EAAC,aAAa,EAAC,QAAQ,CAAU,CAAC;AAEnE,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,SAAS,EAAE,mBAAmB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,sBAAsB;IAC/F,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,EAAE,UAAU,EAAE,sBAAsB;IACjG,SAAS,EAAE,4BAA4B,EAAE,aAAa,EAAE,8BAA8B;IACtF,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,uBAAuB;IACpE,aAAa,EAAE,4BAA4B,EAAE,WAAW,EAAE,4BAA4B;IACtF,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,cAAc;IAChG,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,kBAAkB;CAClG,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,iBAAiB;CACxB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type Industry = 'universal' | 'creative' | 'education' | 'energy' | 'financial' | 'healthcare' | 'logistics' | 'manufacturing' | 'nonprofit' | 'professional' | 'public_sector' | 'real_estate' | 'retail' | 'technology';
|
|
2
|
+
export type FunctionId = 'finance' | 'hr' | 'sales' | 'supply' | 'cx' | 'risk' | 'it' | 'rd';
|
|
3
|
+
export type AiTier = 'gen1' | 'gen2' | 'gen3';
|
|
4
|
+
export type Readiness = 'agile' | 'traditional' | 'siloed';
|
|
5
|
+
export type Classification = 'Accelerate' | 'Fix' | 'Stop';
|
|
6
|
+
export type Bucket = 'Agent-Proof' | 'Agent-Augmented' | 'Agent-Replaceable';
|
|
7
|
+
export type ComplianceFramework = 'eu_ai_act' | 'dora' | 'csrd' | 'gdpr_ai';
|
|
8
|
+
export interface PillarScore {
|
|
9
|
+
value: number;
|
|
10
|
+
confidence?: number;
|
|
11
|
+
evidence?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface FourPillarScore {
|
|
14
|
+
strategic_alignment: PillarScore;
|
|
15
|
+
financial_return: PillarScore;
|
|
16
|
+
change_enablement: PillarScore;
|
|
17
|
+
governance_risk: PillarScore;
|
|
18
|
+
}
|
|
19
|
+
export interface Initiative {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
function: FunctionId;
|
|
23
|
+
ai_tier: AiTier;
|
|
24
|
+
bucket?: Bucket;
|
|
25
|
+
scores: FourPillarScore;
|
|
26
|
+
classification?: Classification;
|
|
27
|
+
decision_confidence?: number;
|
|
28
|
+
compliance?: ComplianceFramework[];
|
|
29
|
+
}
|
|
30
|
+
export interface Portfolio {
|
|
31
|
+
bvf_version: '1.0';
|
|
32
|
+
generated_at?: string;
|
|
33
|
+
organization: {
|
|
34
|
+
name: string;
|
|
35
|
+
industry: Industry;
|
|
36
|
+
region?: string;
|
|
37
|
+
revenue_eur?: number;
|
|
38
|
+
headcount?: number;
|
|
39
|
+
};
|
|
40
|
+
initiatives: Initiative[];
|
|
41
|
+
}
|
|
42
|
+
export interface ScoreInput {
|
|
43
|
+
industry: Industry;
|
|
44
|
+
revenue_eur: number;
|
|
45
|
+
function: FunctionId;
|
|
46
|
+
ai_tier: AiTier;
|
|
47
|
+
readiness: Readiness;
|
|
48
|
+
scores: {
|
|
49
|
+
strategic_alignment: number;
|
|
50
|
+
financial_return: number;
|
|
51
|
+
change_enablement: number;
|
|
52
|
+
governance_risk: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface ScoreResult {
|
|
56
|
+
classification: Classification;
|
|
57
|
+
reason: string;
|
|
58
|
+
gross_low_eur: number;
|
|
59
|
+
gross_high_eur: number;
|
|
60
|
+
net_low_eur: number;
|
|
61
|
+
net_high_eur: number;
|
|
62
|
+
confidence: number;
|
|
63
|
+
multipliers: {
|
|
64
|
+
industry: number;
|
|
65
|
+
tier: number;
|
|
66
|
+
capture_low: number;
|
|
67
|
+
capture_high: number;
|
|
68
|
+
};
|
|
69
|
+
drivers: string[];
|
|
70
|
+
source: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ValidationError {
|
|
73
|
+
path: string;
|
|
74
|
+
msg: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ValidationResult {
|
|
77
|
+
valid: boolean;
|
|
78
|
+
errors: ValidationError[];
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAC/D,YAAY,GAAG,WAAW,GAAG,eAAe,GAAG,WAAW,GAC1D,cAAc,GAAG,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE/E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7F,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,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AC3B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE;QACN,mBAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3F,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ValidationResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a portfolio document against the AI BVF v1.0 schema.
|
|
4
|
+
* Deterministic, no network, no dependencies.
|
|
5
|
+
*/
|
|
6
|
+
export declare function validate(doc: unknown): ValidationResult;
|
|
7
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAWpE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CA8DvD"}
|
package/dist/validate.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { INDUSTRIES, FUNCTIONS, AI_TIERS } from './taxonomy.js';
|
|
2
|
+
const PILLARS = ['strategic_alignment', 'financial_return', 'change_enablement', 'governance_risk'];
|
|
3
|
+
const BUCKETS = ['Agent-Proof', 'Agent-Augmented', 'Agent-Replaceable'];
|
|
4
|
+
const CLASSIFICATIONS = ['Accelerate', 'Fix', 'Stop'];
|
|
5
|
+
const COMPLIANCE = ['eu_ai_act', 'dora', 'csrd', 'gdpr_ai'];
|
|
6
|
+
function isObj(x) {
|
|
7
|
+
return typeof x === 'object' && x !== null && !Array.isArray(x);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Validates a portfolio document against the AI BVF v1.0 schema.
|
|
11
|
+
* Deterministic, no network, no dependencies.
|
|
12
|
+
*/
|
|
13
|
+
export function validate(doc) {
|
|
14
|
+
const errors = [];
|
|
15
|
+
const push = (path, msg) => errors.push({ path, msg });
|
|
16
|
+
if (!isObj(doc))
|
|
17
|
+
return { valid: false, errors: [{ path: '', msg: 'Document must be a JSON object.' }] };
|
|
18
|
+
if (doc.bvf_version !== '1.0')
|
|
19
|
+
push('bvf_version', 'Required. Must be the string "1.0".');
|
|
20
|
+
const org = doc.organization;
|
|
21
|
+
if (!isObj(org))
|
|
22
|
+
push('organization', 'Required object.');
|
|
23
|
+
else {
|
|
24
|
+
if (typeof org.name !== 'string' || !org.name)
|
|
25
|
+
push('organization.name', 'Required string.');
|
|
26
|
+
if (typeof org.industry !== 'string' || !INDUSTRIES.includes(org.industry)) {
|
|
27
|
+
push('organization.industry', `Must be one of: ${INDUSTRIES.join(', ')}.`);
|
|
28
|
+
}
|
|
29
|
+
if (org.revenue_eur !== undefined && (typeof org.revenue_eur !== 'number' || org.revenue_eur < 0)) {
|
|
30
|
+
push('organization.revenue_eur', 'Must be a non-negative number.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (!Array.isArray(doc.initiatives) || doc.initiatives.length === 0) {
|
|
34
|
+
push('initiatives', 'Required. Must be a non-empty array.');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
doc.initiatives.forEach((init, i) => {
|
|
38
|
+
const base = `initiatives[${i}]`;
|
|
39
|
+
if (!isObj(init)) {
|
|
40
|
+
push(base, 'Must be an object.');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (typeof init.id !== 'string' || !/^[a-z0-9-]{1,64}$/.test(init.id))
|
|
44
|
+
push(`${base}.id`, 'Required. Lowercase letters, digits, hyphens only (max 64).');
|
|
45
|
+
if (typeof init.name !== 'string' || !init.name)
|
|
46
|
+
push(`${base}.name`, 'Required string.');
|
|
47
|
+
else if (init.name.length > 240)
|
|
48
|
+
push(`${base}.name`, 'Exceeds 240 characters.');
|
|
49
|
+
if (typeof init.function !== 'string' || !FUNCTIONS.includes(init.function))
|
|
50
|
+
push(`${base}.function`, `Must be one of: ${FUNCTIONS.join(', ')}.`);
|
|
51
|
+
if (typeof init.ai_tier !== 'string' || !AI_TIERS.includes(init.ai_tier))
|
|
52
|
+
push(`${base}.ai_tier`, `Must be one of: ${AI_TIERS.join(', ')}.`);
|
|
53
|
+
if (init.bucket !== undefined && !BUCKETS.includes(init.bucket))
|
|
54
|
+
push(`${base}.bucket`, `Must be one of: ${BUCKETS.join(', ')}.`);
|
|
55
|
+
const scores = init.scores;
|
|
56
|
+
if (!isObj(scores))
|
|
57
|
+
push(`${base}.scores`, 'Required object with all four pillar scores.');
|
|
58
|
+
else {
|
|
59
|
+
for (const p of PILLARS) {
|
|
60
|
+
const ps = scores[p];
|
|
61
|
+
if (!isObj(ps)) {
|
|
62
|
+
push(`${base}.scores.${p}`, 'Required pillar score object.');
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const v = ps.value;
|
|
66
|
+
if (typeof v !== 'number' || v < 0 || v > 100)
|
|
67
|
+
push(`${base}.scores.${p}.value`, 'Required. Number in [0, 100].');
|
|
68
|
+
if (ps.confidence !== undefined && (typeof ps.confidence !== 'number' || ps.confidence < 0 || ps.confidence > 100)) {
|
|
69
|
+
push(`${base}.scores.${p}.confidence`, 'Optional. Number in [0, 100].');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (init.classification !== undefined && !CLASSIFICATIONS.includes(init.classification))
|
|
74
|
+
push(`${base}.classification`, `Must be one of: ${CLASSIFICATIONS.join(', ')}.`);
|
|
75
|
+
if (init.decision_confidence !== undefined) {
|
|
76
|
+
const v = init.decision_confidence;
|
|
77
|
+
if (typeof v !== 'number' || v < 0 || v > 100)
|
|
78
|
+
push(`${base}.decision_confidence`, 'Must be a number in [0, 100].');
|
|
79
|
+
}
|
|
80
|
+
if (init.compliance !== undefined) {
|
|
81
|
+
if (!Array.isArray(init.compliance))
|
|
82
|
+
push(`${base}.compliance`, 'Must be an array.');
|
|
83
|
+
else
|
|
84
|
+
init.compliance.forEach((c, j) => {
|
|
85
|
+
if (!COMPLIANCE.includes(c))
|
|
86
|
+
push(`${base}.compliance[${j}]`, `Must be one of: ${COMPLIANCE.join(', ')}.`);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return { valid: errors.length === 0, errors };
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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AAC,IAAI,CAAC,UAAU,CAAC;oBAAE,IAAI,CAAC,GAAG,IAAI,aAAa,EAAE,mBAAmB,CAAC,CAAC;;oBAChF,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;wBACpC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAW,CAAC;4BAAE,IAAI,CAAC,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,mBAAmB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACvH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAChD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aibvf/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "AI BVF — open protocol for scoring AI investments. Validator and scoring engine.",
|
|
5
|
+
"keywords": ["ai", "bvf", "ai-governance", "enterprise-ai", "ai-scoring", "ai-roi", "eu-ai-act", "standards"],
|
|
6
|
+
"homepage": "https://bvf-app.vercel.app/protocol",
|
|
7
|
+
"repository": "github:craighorton/ai-bvf",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "Craig Horton",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" },
|
|
15
|
+
"./schema": { "import": "./dist/schema.js", "types": "./dist/schema.d.ts" }
|
|
16
|
+
},
|
|
17
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"test": "node --test dist/*.test.js"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"typescript": "^5.4.0",
|
|
24
|
+
"@types/node": "^20.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|