@connexum/agent-standards 0.0.0-stage → 0.1.0-beta.1

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 CHANGED
@@ -1,3 +1,20 @@
1
- # Temporary Holding Version
1
+ # @connexum/agent-standards
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Standards coverage for any agent on any stack. On the first scan and every scan after, an agent is scored against:
4
+
5
+ - **always:** OWASP LLM Top 10, OWASP Agentic Top 10, the My-CC runtime checks;
6
+ - **installed:** every framework whose My-CC pack is bound to the agent (HIPAA, PCI DSS, GDPR, EU AI Act, Colorado AI Act, SOC 2, ISO/IEC 42001, NIST AI RMF): scored;
7
+ - **recommended:** a framework that fits the agent's industry, data classes or regions but has no pack bound: documented with its controls, not scored;
8
+ - **not applicable:** a framework that does not fit: omitted with the reason.
9
+
10
+ Practice frameworks (agent identity and access, MCP server security) are My-CC checks with no pack: scored when they fit.
11
+
12
+ One catalogue (`catalogue/catalogue.json`) drives this package and the Python twin (`connexum-agent-standards`); the same conformance cases run in both. Evidence is a map of facts the runtime supplies (`prompt.isolated`, `safe_harbor`, `kill_switch`, ...); a missing fact is **not checked**, never a pass.
13
+
14
+ ```ts
15
+ import { scoreAgent, applicability, standardsLines } from '@connexum/agent-standards'
16
+ const report = scoreAgent({ industry: 'healthcare', dataClasses: ['phi'], regions: ['us'], tools: ['ehr.read_note'], boundPacks: ['hipaa'] }, { safe_harbor: true, 'data.min_necessary': true })
17
+ // report.score, report.frameworks[].pass/total, report.omitted[], report.evidenceMissing[]
18
+ ```
19
+
20
+ End-state item D1 (any stack) and D3 (any agent): the scan that every stack runs. First consumer: the AOL spoke's Secure agent builder (CliniVantIQ); the catalogue replaces the spoke's local copy.
@@ -0,0 +1,115 @@
1
+ {
2
+ "version": "2026-10-20",
3
+ "note": "Standards an agent is scored against on its first scan and every scan after. OWASP LLM, OWASP Agentic and the My-CC runtime apply to every agent. A framework with a My-CC pack is scored when that pack is bound to the agent; when it fits the agent's industry, data or regions but is not bound it is documented as recommended, not scored; when it does not fit it is omitted with the reason. Practice frameworks (agent identity, MCP security) are My-CC checks with no pack: scored when they fit. Evidence keys name the facts a runtime supplies; a missing fact is 'not checked', never a pass.",
4
+ "evidence": {
5
+ "prompt.isolated": "retrieved content and tool output are screened before they reach the prompt",
6
+ "goal.locked": "the agent's objective cannot be rewritten by content it reads",
7
+ "output.validated": "model output is validated against a schema before a tool runs it",
8
+ "citations.required": "answers must cite retrieved sources",
9
+ "prompt.no_secret": "no secret in the system prompt; keys live in a vault",
10
+ "data.min_necessary": "tools read the minimum necessary; identifiers never leave the hub",
11
+ "deid.before_model": "identifiers are removed or tokenized before any model call",
12
+ "rag.tenant_isolated": "the retrieval index is tenant-scoped",
13
+ "rag.provenance": "the index accepts only sources with a citable id and a source hash",
14
+ "memory.validated": "memory writes are validated and expire",
15
+ "runtime.sandbox": "shell execution is forbidden or sandboxed",
16
+ "egress.allowlist": "outbound network is allowlisted",
17
+ "credentials.scoped": "every tool has a scope and a data class; credentials are per tool",
18
+ "circuit_breaker": "a circuit breaker trips after repeated blocks",
19
+ "kill_switch": "a kill switch and pause exist and are armed",
20
+ "human_approval": "high-impact actions require a named person's approval; the raw action is shown",
21
+ "audit.hash_linked": "every decision is sealed on a hash-linked audit chain",
22
+ "counterfactual_logging": "blocked actions are logged with what would have happened",
23
+ "model.pinned": "the model is pinned by provider, name and version",
24
+ "tac.floor": "a minimum TAC Score is enforced; agents do not run below it",
25
+ "packs.bound": "at least one signed policy pack is bound",
26
+ "phi.lineage": "PHI lineage is consent-scoped and recorded",
27
+ "owner.named": "an accountable owner is named",
28
+ "intended_use.documented": "purpose, trigger, data and outputs are documented",
29
+ "evals.present": "a pre-deployment evaluation suite exists, including red-team prompts",
30
+ "incident.response": "incident response exists: kill switch, pause, escalation",
31
+ "tools.scoped": "tools are limited to the directory of record and the agent's steps",
32
+ "tools.validated": "tool parameters are validated on every call",
33
+ "identity.passport": "the agent holds its own Agent Passport and credentials",
34
+ "messages.signed": "agent-to-agent messages are signed and allowlisted",
35
+ "supply.pinned": "runtime packages are pinned and locked",
36
+ "supply.signed": "components are signed and tracked in an AI bill of materials",
37
+ "limits.set": "token, tool-call and rate limits are set",
38
+ "audit.controls": "every access is recorded on the chain",
39
+ "cardholder.masked": "cardholder data is masked or tokenized before storage and model use",
40
+ "safe_harbor": "Safe Harbor de-identification is applied before model use"
41
+ },
42
+ "frameworks": [
43
+ { "id": "owasp-llm", "name": "OWASP LLM", "authority": "OWASP Top 10 for LLM Applications (2025)", "kind": "always", "packIds": ["owasp-llm", "owasp"], "controls": [
44
+ { "id": "LLM01", "control": "Prompt injection", "writesTo": "policy.yaml", "evidence": "prompt.isolated" },
45
+ { "id": "LLM02", "control": "Sensitive information disclosure", "writesTo": "policy.yaml", "evidence": "data.min_necessary" },
46
+ { "id": "LLM03", "control": "Supply chain", "writesTo": "agent.yaml", "evidence": "supply.pinned" },
47
+ { "id": "LLM04", "control": "Data and model poisoning", "writesTo": "memory.yaml", "evidence": "rag.provenance" },
48
+ { "id": "LLM05", "control": "Improper output handling", "writesTo": "policy.yaml", "evidence": "output.validated" },
49
+ { "id": "LLM06", "control": "Excessive agency", "writesTo": "tools.json", "evidence": "tools.scoped" },
50
+ { "id": "LLM07", "control": "System prompt leakage", "writesTo": "prompts/system.md", "evidence": "prompt.no_secret" },
51
+ { "id": "LLM08", "control": "Vector and embedding weaknesses", "writesTo": "memory.yaml", "evidence": "rag.tenant_isolated" },
52
+ { "id": "LLM09", "control": "Misinformation", "writesTo": "policy.yaml", "evidence": "citations.required" },
53
+ { "id": "LLM10", "control": "Unbounded consumption", "writesTo": "policy.yaml", "evidence": "limits.set" } ] },
54
+ { "id": "owasp-agentic", "name": "OWASP Agentic", "authority": "OWASP Top 10 for Agentic Applications", "kind": "always", "packIds": ["owasp-agentic", "owasp"], "controls": [
55
+ { "id": "ASI01", "control": "Agent goal hijack", "writesTo": "policy.yaml", "evidence": "goal.locked" },
56
+ { "id": "ASI02", "control": "Tool misuse and exploitation", "writesTo": "tools.json", "evidence": "tools.validated" },
57
+ { "id": "ASI03", "control": "Identity and privilege abuse", "writesTo": "agent.yaml", "evidence": "identity.passport" },
58
+ { "id": "ASI04", "control": "Agentic supply chain", "writesTo": "aibom.json", "evidence": "supply.signed" },
59
+ { "id": "ASI05", "control": "Unexpected code execution", "writesTo": "policy.yaml", "evidence": "runtime.sandbox" },
60
+ { "id": "ASI06", "control": "Memory and context poisoning", "writesTo": "memory.yaml", "evidence": "memory.validated" },
61
+ { "id": "ASI07", "control": "Insecure inter-agent communication", "writesTo": "agent.yaml", "evidence": "messages.signed" },
62
+ { "id": "ASI08", "control": "Cascading failures", "writesTo": "policy.yaml", "evidence": "circuit_breaker" },
63
+ { "id": "ASI09", "control": "Human-agent trust exploitation", "writesTo": "policy.yaml", "evidence": "human_approval" },
64
+ { "id": "ASI10", "control": "Rogue agents", "writesTo": "agent.yaml", "evidence": "identity.passport" } ] },
65
+ { "id": "mycc-runtime", "name": "My-CC runtime", "authority": "My Compliance Citadel runtime checks", "kind": "always", "packIds": [], "controls": [
66
+ { "id": "CIT-01", "control": "Required policy packs bound", "writesTo": "policy.yaml", "evidence": "packs.bound" },
67
+ { "id": "CIT-02", "control": "Model provenance pinning", "writesTo": "agent.yaml", "evidence": "model.pinned" },
68
+ { "id": "CIT-03", "control": "Hash-linked audit", "writesTo": "policy.yaml", "evidence": "audit.hash_linked" },
69
+ { "id": "CIT-04", "control": "Counterfactual logging", "writesTo": "policy.yaml", "evidence": "counterfactual_logging" },
70
+ { "id": "CIT-05", "control": "Consent-scoped PHI lineage", "writesTo": "policy.yaml", "evidence": "phi.lineage", "onlyWith": { "dataClasses": ["phi"] } },
71
+ { "id": "CIT-06", "control": "TAC band floor enforced", "writesTo": "policy.yaml", "evidence": "tac.floor" } ] },
72
+ { "id": "nist-ai-rmf", "name": "NIST AI RMF", "authority": "US NIST AI RMF 1.0, AI 600-1", "kind": "pack", "packIds": ["nist_ai_rmf", "nist-ai-rmf"], "fits": {}, "why": "US best-practice framework for every agent", "controls": [
73
+ { "id": "GOV-1.2", "control": "Accountable owner (Govern)", "writesTo": "owner", "evidence": "owner.named" },
74
+ { "id": "MAP-1.1", "control": "Intended use documented (Map)", "writesTo": "docs/intended-use.md", "evidence": "intended_use.documented" },
75
+ { "id": "MEA-2.3", "control": "Pre-deployment evaluation (Measure)", "writesTo": "evals/suite.yaml", "evidence": "evals.present" },
76
+ { "id": "MAN-4.1", "control": "Incident response (Manage)", "writesTo": "policy.yaml", "evidence": "incident.response" } ] },
77
+ { "id": "hipaa", "name": "HIPAA", "authority": "US HHS Office for Civil Rights", "kind": "pack", "packIds": ["hipaa", "hipaa-core"], "fits": { "dataClasses": ["phi"] }, "why": "handles PHI", "notFit": "no PHI on this agent", "controls": [
78
+ { "id": "164.502(b)", "control": "Minimum necessary", "writesTo": "tools.json", "evidence": "data.min_necessary" },
79
+ { "id": "164.514(b)", "control": "Safe Harbor de-identification", "writesTo": "policy.yaml", "evidence": "safe_harbor" },
80
+ { "id": "164.312(b)", "control": "Audit controls", "writesTo": "policy.yaml", "evidence": "audit.controls" } ] },
81
+ { "id": "pci-dss", "name": "PCI DSS", "authority": "PCI Security Standards Council", "kind": "pack", "packIds": ["pci-dss"], "fits": { "dataClasses": ["cardholder"] }, "why": "handles cardholder data", "notFit": "no cardholder data on this agent", "controls": [
82
+ { "id": "3.4", "control": "Render PAN unreadable", "writesTo": "policy.yaml", "evidence": "cardholder.masked" },
83
+ { "id": "7.1", "control": "Restrict access to cardholder data", "writesTo": "tools.json", "evidence": "credentials.scoped" },
84
+ { "id": "10.2", "control": "Audit trail of access", "writesTo": "policy.yaml", "evidence": "audit.controls" } ] },
85
+ { "id": "gdpr", "name": "GDPR", "authority": "EU data protection authorities; UK ICO for UK GDPR", "kind": "pack", "packIds": ["gdpr", "uk-gdpr"], "fits": { "regions": ["eu", "uk"] }, "why": "people in the EU or the UK", "notFit": "no people in the EU or the UK", "controls": [
86
+ { "id": "Art.5", "control": "Data minimisation", "writesTo": "tools.json", "evidence": "data.min_necessary" },
87
+ { "id": "Art.25", "control": "Data protection by design", "writesTo": "policy.yaml", "evidence": "deid.before_model" },
88
+ { "id": "Art.22", "control": "Automated decisions: human involvement", "writesTo": "policy.yaml", "evidence": "human_approval" },
89
+ { "id": "Art.30", "control": "Records of processing", "writesTo": "policy.yaml", "evidence": "audit.controls" } ] },
90
+ { "id": "eu-ai-act", "name": "EU AI Act", "authority": "European Commission AI Office", "kind": "pack", "packIds": ["eu-ai-act"], "fits": { "regions": ["eu"] }, "why": "people in the EU", "notFit": "no people in the EU", "controls": [
91
+ { "id": "Art.9", "control": "Risk management and testing", "writesTo": "evals/suite.yaml", "evidence": "evals.present" },
92
+ { "id": "Art.12", "control": "Record keeping", "writesTo": "policy.yaml", "evidence": "audit.hash_linked" },
93
+ { "id": "Art.14", "control": "Human oversight", "writesTo": "policy.yaml", "evidence": "human_approval" } ] },
94
+ { "id": "colorado-ai", "name": "Colorado AI Act", "authority": "Colorado Attorney General", "kind": "pack", "packIds": ["colorado-ai"], "fits": { "regions": ["us-co"] }, "why": "people in Colorado", "notFit": "no people in Colorado", "controls": [
95
+ { "id": "6-1-1703(2)", "control": "Impact assessment", "writesTo": "evals/suite.yaml", "evidence": "evals.present" },
96
+ { "id": "6-1-1703(4)", "control": "Notice and human review of consequential decisions", "writesTo": "policy.yaml", "evidence": "human_approval" },
97
+ { "id": "6-1-1703(1)", "control": "Documented intended use", "writesTo": "docs/intended-use.md", "evidence": "intended_use.documented" } ] },
98
+ { "id": "soc2", "name": "SOC 2", "authority": "AICPA Trust Services Criteria", "kind": "pack", "packIds": ["soc2"], "fits": { "dataClassesAbsent": ["phi", "cardholder"] }, "why": "no PHI or cardholder data; general controls apply", "notFit": "PHI or cardholder data on this agent; the sector framework applies first", "controls": [
99
+ { "id": "CC6.1", "control": "Logical access", "writesTo": "tools.json", "evidence": "credentials.scoped" },
100
+ { "id": "CC7.2", "control": "Monitoring of system components", "writesTo": "policy.yaml", "evidence": "audit.hash_linked" },
101
+ { "id": "CC8.1", "control": "Change management", "writesTo": "aibom.json", "evidence": "supply.signed" } ] },
102
+ { "id": "iso-42001", "name": "ISO/IEC 42001", "authority": "ISO/IEC", "kind": "pack", "packIds": ["iso_42001", "iso-42001"], "fits": {}, "why": "international AI management system; certifiable", "controls": [
103
+ { "id": "6.1", "control": "AI risk assessment", "writesTo": "docs/intended-use.md", "evidence": "intended_use.documented" },
104
+ { "id": "8.4", "control": "AI system verification and validation", "writesTo": "evals/suite.yaml", "evidence": "evals.present" },
105
+ { "id": "9.1", "control": "Monitoring and measurement", "writesTo": "policy.yaml", "evidence": "audit.controls" } ] },
106
+ { "id": "agent-identity", "name": "Agent identity and access", "authority": "NIST NCCoE, CoSAI and FIDO Alliance guidance (2026)", "kind": "practice", "packIds": ["agent-identity"], "fits": {}, "why": "every agent needs its own Agent Passport and credentials", "controls": [
107
+ { "id": "AID-1", "control": "Own passport and credentials", "writesTo": "agent.yaml", "evidence": "identity.passport" },
108
+ { "id": "AID-2", "control": "Scoped credentials per tool", "writesTo": "tools.json", "evidence": "credentials.scoped" },
109
+ { "id": "AID-3", "control": "Signed agent-to-agent messages", "writesTo": "agent.yaml", "evidence": "messages.signed" } ] },
110
+ { "id": "mcp-security", "name": "MCP server security", "authority": "CoSAI MCP Security Taxonomy (2026)", "kind": "practice", "packIds": ["mcp-security"], "fits": { "mcp": true }, "why": "the agent calls MCP tools", "notFit": "the agent calls no MCP tools", "controls": [
111
+ { "id": "MCP-1", "control": "Tool parameters validated per call", "writesTo": "tools.json", "evidence": "tools.validated" },
112
+ { "id": "MCP-2", "control": "Egress allowlist for tool servers", "writesTo": "policy.yaml", "evidence": "egress.allowlist" },
113
+ { "id": "MCP-3", "control": "Tools limited to the directory of record", "writesTo": "tools.json", "evidence": "tools.scoped" } ] }
114
+ ]
115
+ }
@@ -0,0 +1,13 @@
1
+ import type { AgentProfile, Framework, FrameworkApplicability } from './types.js';
2
+ /** The pack bound on the agent that carries this framework, if any (ids as My-CC publishes them; version suffixes ignored). */
3
+ export declare function boundPackFor(fw: Framework, profile: AgentProfile): string | null;
4
+ /** Does the framework fit this agent's industry, data, regions or tools? (Only used when its pack is not bound.) */
5
+ export declare function fits(fw: Framework, profile: AgentProfile): boolean;
6
+ /**
7
+ * Which frameworks apply to this agent, and how: 'always' (OWASP LLM, OWASP Agentic, My-CC runtime), 'installed' (its
8
+ * My-CC pack is bound to the agent), 'recommended' (it fits the industry, data or regions but no pack is bound; documented,
9
+ * not scored), 'not_applicable' (does not fit; omitted with the reason). Practice frameworks are My-CC checks with no pack:
10
+ * applicable when they fit.
11
+ */
12
+ export declare function applicability(profile: AgentProfile): FrameworkApplicability[];
13
+ //# sourceMappingURL=applicability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicability.d.ts","sourceRoot":"","sources":["../src/applicability.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAKjF,+HAA+H;AAC/H,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAGhF;AAED,oHAAoH;AACpH,wBAAgB,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CASlE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,sBAAsB,EAAE,CAS7E"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.boundPackFor = boundPackFor;
4
+ exports.fits = fits;
5
+ exports.applicability = applicability;
6
+ const catalogue_js_1 = require("./catalogue.js");
7
+ const norm = (s) => s.trim().toLowerCase();
8
+ const normPack = (s) => norm(s).replace(/@.*$/, '').replace(/_/g, '-');
9
+ /** The pack bound on the agent that carries this framework, if any (ids as My-CC publishes them; version suffixes ignored). */
10
+ function boundPackFor(fw, profile) {
11
+ const ids = fw.packIds.map(normPack);
12
+ return profile.boundPacks.find((p) => ids.includes(normPack(p))) ?? null;
13
+ }
14
+ /** Does the framework fit this agent's industry, data, regions or tools? (Only used when its pack is not bound.) */
15
+ function fits(fw, profile) {
16
+ const f = fw.fits ?? {};
17
+ const classes = profile.dataClasses.map(norm);
18
+ const regions = profile.regions.map(norm);
19
+ if (f.industries && !f.industries.map(norm).includes(norm(profile.industry ?? '')))
20
+ return false;
21
+ if (f.dataClasses && !f.dataClasses.some((c) => classes.includes(norm(c))))
22
+ return false;
23
+ if (f.dataClassesAbsent && f.dataClassesAbsent.some((c) => classes.includes(norm(c))))
24
+ return false;
25
+ if (f.regions && !f.regions.some((r) => regions.includes(norm(r))))
26
+ return false;
27
+ if (f.mcp !== undefined && Boolean(profile.mcp ?? profile.tools.length > 0) !== f.mcp)
28
+ return false;
29
+ return true;
30
+ }
31
+ /**
32
+ * Which frameworks apply to this agent, and how: 'always' (OWASP LLM, OWASP Agentic, My-CC runtime), 'installed' (its
33
+ * My-CC pack is bound to the agent), 'recommended' (it fits the industry, data or regions but no pack is bound; documented,
34
+ * not scored), 'not_applicable' (does not fit; omitted with the reason). Practice frameworks are My-CC checks with no pack:
35
+ * applicable when they fit.
36
+ */
37
+ function applicability(profile) {
38
+ return (0, catalogue_js_1.loadCatalogue)().frameworks.map((fw) => {
39
+ const bound = boundPackFor(fw, profile);
40
+ const base = { framework: fw.id, name: fw.name, packIds: fw.packIds, boundPack: bound };
41
+ if (fw.kind === 'always')
42
+ return { ...base, status: 'always', why: 'applies to every agent' };
43
+ if (bound)
44
+ return { ...base, status: 'installed', why: `pack ${bound} is bound to the agent` };
45
+ if (fits(fw, profile))
46
+ return { ...base, status: fw.kind === 'practice' ? 'always' : 'recommended', why: fw.why ?? 'fits this agent' };
47
+ return { ...base, status: 'not_applicable', why: fw.notFit ?? 'does not fit this agent' };
48
+ });
49
+ }
50
+ //# sourceMappingURL=applicability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicability.js","sourceRoot":"","sources":["../src/applicability.ts"],"names":[],"mappings":";;AAOA,oCAGC;AAGD,oBASC;AAQD,sCASC;AAvCD,iDAA8C;AAG9C,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;AAClD,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAE9E,+HAA+H;AAC/H,SAAgB,YAAY,CAAC,EAAa,EAAE,OAAqB;IAC/D,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;AAC1E,CAAC;AAED,oHAAoH;AACpH,SAAgB,IAAI,CAAC,EAAa,EAAE,OAAqB;IACvD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAA;IACvB,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACxF,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAAE,OAAO,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AAE,GAAG,IAAI,EAAE,MAAM,EAAE,QAAiB,EAAE,GAAG,EAAE,wBAAwB,EAAE,CAAA;QACtG,IAAI,KAAK;YAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,WAAoB,EAAE,GAAG,EAAE,QAAQ,KAAK,wBAAwB,EAAE,CAAA;QACvG,IAAI,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC;YAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAE,QAAkB,CAAC,CAAC,CAAE,aAAuB,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,iBAAiB,EAAE,CAAA;QAC5J,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,gBAAyB,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,IAAI,yBAAyB,EAAE,CAAA;IACpG,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Catalogue, Framework } from './types.js';
2
+ /** The catalogue shipped with the package (catalogue/catalogue.json); the Python twin reads the same file. */
3
+ export declare function loadCatalogue(): Catalogue;
4
+ export declare function frameworkById(id: string): Framework | undefined;
5
+ //# sourceMappingURL=catalogue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAGtD,8GAA8G;AAC9G,wBAAgB,aAAa,IAAI,SAAS,CAKzC;AACD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAA+D"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadCatalogue = loadCatalogue;
4
+ exports.frameworkById = frameworkById;
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ let cached = null;
8
+ /** The catalogue shipped with the package (catalogue/catalogue.json); the Python twin reads the same file. */
9
+ function loadCatalogue() {
10
+ if (cached)
11
+ return cached;
12
+ const raw = (0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '..', 'catalogue', 'catalogue.json'), 'utf8');
13
+ cached = JSON.parse(raw);
14
+ return cached;
15
+ }
16
+ function frameworkById(id) { return loadCatalogue().frameworks.find((f) => f.id === id); }
17
+ //# sourceMappingURL=catalogue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":";;AAMA,sCAKC;AACD,sCAA+H;AAZ/H,qCAAsC;AACtC,yCAAgC;AAGhC,IAAI,MAAM,GAAqB,IAAI,CAAA;AACnC,8GAA8G;AAC9G,SAAgB,aAAa;IAC3B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAA;IACzB,MAAM,GAAG,GAAG,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAA;IACtF,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAc,CAAA;IACrC,OAAO,MAAM,CAAA;AACf,CAAC;AACD,SAAgB,aAAa,CAAC,EAAU,IAA2B,OAAO,aAAa,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export { loadCatalogue, frameworkById } from './catalogue.js';
3
+ export { applicability, fits, boundPackFor } from './applicability.js';
4
+ export { scoreAgent, standardsLines } from './score.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.standardsLines = exports.scoreAgent = exports.boundPackFor = exports.fits = exports.applicability = exports.frameworkById = exports.loadCatalogue = void 0;
18
+ __exportStar(require("./types.js"), exports);
19
+ var catalogue_js_1 = require("./catalogue.js");
20
+ Object.defineProperty(exports, "loadCatalogue", { enumerable: true, get: function () { return catalogue_js_1.loadCatalogue; } });
21
+ Object.defineProperty(exports, "frameworkById", { enumerable: true, get: function () { return catalogue_js_1.frameworkById; } });
22
+ var applicability_js_1 = require("./applicability.js");
23
+ Object.defineProperty(exports, "applicability", { enumerable: true, get: function () { return applicability_js_1.applicability; } });
24
+ Object.defineProperty(exports, "fits", { enumerable: true, get: function () { return applicability_js_1.fits; } });
25
+ Object.defineProperty(exports, "boundPackFor", { enumerable: true, get: function () { return applicability_js_1.boundPackFor; } });
26
+ var score_js_1 = require("./score.js");
27
+ Object.defineProperty(exports, "scoreAgent", { enumerable: true, get: function () { return score_js_1.scoreAgent; } });
28
+ Object.defineProperty(exports, "standardsLines", { enumerable: true, get: function () { return score_js_1.standardsLines; } });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA0B;AAC1B,+CAA6D;AAApD,6GAAA,aAAa,OAAA;AAAE,6GAAA,aAAa,OAAA;AACrC,uDAAsE;AAA7D,iHAAA,aAAa,OAAA;AAAE,wGAAA,IAAI,OAAA;AAAE,gHAAA,YAAY,OAAA;AAC1C,uCAAuD;AAA9C,sGAAA,UAAU,OAAA;AAAE,0GAAA,cAAc,OAAA"}
@@ -0,0 +1,17 @@
1
+ import type { AgentProfile, Evidence, StandardsReport } from './types.js';
2
+ /**
3
+ * Score the agent: every applicable framework's controls against the evidence the runtime supplied. A scored framework
4
+ * ('always' or 'installed') counts pass / total; an unknown fact is 'not_checked' and counts in the total, never as a
5
+ * pass. A recommended framework lists its controls as 'not_scored' so the gap is documented. The overall score is the
6
+ * pass share across scored frameworks, 0 to 100.
7
+ */
8
+ export declare function scoreAgent(profile: AgentProfile, evidence: Evidence): StandardsReport;
9
+ /** The standards one per line for an agent folder: installed (pack bound), recommended (fits), or not applicable. */
10
+ export declare function standardsLines(profile: AgentProfile): Array<{
11
+ id: string;
12
+ name: string;
13
+ state: 'installed' | 'recommended' | 'always' | 'not_applicable';
14
+ why: string;
15
+ packIds: string[];
16
+ }>;
17
+ //# sourceMappingURL=score.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAyC,MAAM,YAAY,CAAA;AAShH;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAuBrF;AAED,qHAAqH;AACrH,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,QAAQ,GAAG,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAE3L"}
package/dist/score.js ADDED
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scoreAgent = scoreAgent;
4
+ exports.standardsLines = standardsLines;
5
+ const catalogue_js_1 = require("./catalogue.js");
6
+ const applicability_js_1 = require("./applicability.js");
7
+ const norm = (s) => s.trim().toLowerCase();
8
+ function controlApplies(c, profile) {
9
+ if (!c.onlyWith?.dataClasses)
10
+ return true;
11
+ const classes = profile.dataClasses.map(norm);
12
+ return c.onlyWith.dataClasses.some((d) => classes.includes(norm(d)));
13
+ }
14
+ /**
15
+ * Score the agent: every applicable framework's controls against the evidence the runtime supplied. A scored framework
16
+ * ('always' or 'installed') counts pass / total; an unknown fact is 'not_checked' and counts in the total, never as a
17
+ * pass. A recommended framework lists its controls as 'not_scored' so the gap is documented. The overall score is the
18
+ * pass share across scored frameworks, 0 to 100.
19
+ */
20
+ function scoreAgent(profile, evidence) {
21
+ const cat = (0, catalogue_js_1.loadCatalogue)();
22
+ const missing = new Set();
23
+ const frameworks = [];
24
+ const omitted = [];
25
+ for (const app of (0, applicability_js_1.applicability)(profile)) {
26
+ const fw = cat.frameworks.find((f) => f.id === app.framework);
27
+ if (app.status === 'not_applicable') {
28
+ omitted.push({ framework: fw.id, name: fw.name, why: app.why });
29
+ continue;
30
+ }
31
+ const scored = app.status === 'always' || app.status === 'installed';
32
+ const checks = fw.controls.filter((c) => controlApplies(c, profile)).map((c) => {
33
+ const fact = evidence[c.evidence];
34
+ const base = { id: c.id, framework: fw.id, frameworkName: fw.name, control: c.control, writesTo: c.writesTo, evidence: c.evidence };
35
+ if (!scored)
36
+ return { ...base, result: 'not_scored', detail: `documented: ${app.why}; bind the pack to score it` };
37
+ if (fact === true)
38
+ return { ...base, result: 'pass', detail: cat.evidence[c.evidence] ?? c.evidence };
39
+ if (fact === false)
40
+ return { ...base, result: 'fail', detail: `missing: ${cat.evidence[c.evidence] ?? c.evidence}` };
41
+ missing.add(c.evidence);
42
+ return { ...base, result: 'not_checked', detail: `no evidence supplied for ${c.evidence}` };
43
+ });
44
+ frameworks.push({ framework: fw.id, name: fw.name, authority: fw.authority, status: app.status, scored, why: app.why, pass: checks.filter((c) => c.result === 'pass').length, total: scored ? checks.length : 0, notChecked: checks.filter((c) => c.result === 'not_checked').length, checks });
45
+ }
46
+ const scoredFw = frameworks.filter((f) => f.scored);
47
+ const pass = scoredFw.reduce((n, f) => n + f.pass, 0);
48
+ const total = scoredFw.reduce((n, f) => n + f.total, 0);
49
+ return { catalogueVersion: cat.version, agentId: profile.agentId ?? null, score: total ? Math.round((pass / total) * 100) : 0, scoredFrameworks: scoredFw.length, frameworks, omitted, evidenceMissing: [...missing].sort() };
50
+ }
51
+ /** The standards one per line for an agent folder: installed (pack bound), recommended (fits), or not applicable. */
52
+ function standardsLines(profile) {
53
+ return (0, applicability_js_1.applicability)(profile).map((a) => ({ id: a.framework, name: a.name, state: a.status, why: a.why, packIds: a.packIds }));
54
+ }
55
+ //# sourceMappingURL=score.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.js","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":";;AAiBA,gCAuBC;AAGD,wCAEC;AA7CD,iDAA8C;AAC9C,yDAAkD;AAGlD,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EA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AE,OAAO,EAAE,eAAe,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAA;AAC/N,CAAC;AAED,qHAAqH;AACrH,SAAgB,cAAc,CAAC,OAAqB;IAClD,OAAO,IAAA,gCAAa,EAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AAChI,CAAC"}
@@ -0,0 +1,92 @@
1
+ export type FrameworkKind = 'always' | 'pack' | 'practice';
2
+ export interface Fit {
3
+ industries?: string[];
4
+ dataClasses?: string[];
5
+ dataClassesAbsent?: string[];
6
+ regions?: string[];
7
+ mcp?: boolean;
8
+ }
9
+ export interface Control {
10
+ id: string;
11
+ control: string;
12
+ writesTo: string;
13
+ evidence: string;
14
+ onlyWith?: {
15
+ dataClasses?: string[];
16
+ };
17
+ }
18
+ export interface Framework {
19
+ id: string;
20
+ name: string;
21
+ authority: string;
22
+ kind: FrameworkKind;
23
+ packIds: string[];
24
+ fits?: Fit;
25
+ why?: string;
26
+ notFit?: string;
27
+ controls: Control[];
28
+ }
29
+ export interface Catalogue {
30
+ version: string;
31
+ note: string;
32
+ evidence: Record<string, string>;
33
+ frameworks: Framework[];
34
+ }
35
+ /** What the scanner knows about the agent. Industry, data classes and regions use the catalogue's lower-case keys. */
36
+ export interface AgentProfile {
37
+ agentId?: string;
38
+ industry?: string;
39
+ dataClasses: string[];
40
+ regions: string[];
41
+ tools: string[];
42
+ boundPacks: string[];
43
+ mcp?: boolean;
44
+ }
45
+ /** Facts the runtime supplies, by evidence key: true, false, or unknown (missing or null). */
46
+ export type Evidence = Record<string, boolean | null | undefined>;
47
+ export type Applicability = 'always' | 'installed' | 'recommended' | 'not_applicable';
48
+ export interface FrameworkApplicability {
49
+ framework: string;
50
+ name: string;
51
+ status: Applicability;
52
+ why: string;
53
+ packIds: string[];
54
+ boundPack: string | null;
55
+ }
56
+ export type CheckResult = 'pass' | 'fail' | 'not_checked' | 'not_scored';
57
+ export interface CheckReport {
58
+ id: string;
59
+ framework: string;
60
+ frameworkName: string;
61
+ control: string;
62
+ writesTo: string;
63
+ evidence: string;
64
+ result: CheckResult;
65
+ detail: string;
66
+ }
67
+ export interface FrameworkReport {
68
+ framework: string;
69
+ name: string;
70
+ authority: string;
71
+ status: Applicability;
72
+ scored: boolean;
73
+ why: string;
74
+ pass: number;
75
+ total: number;
76
+ notChecked: number;
77
+ checks: CheckReport[];
78
+ }
79
+ export interface StandardsReport {
80
+ catalogueVersion: string;
81
+ agentId: string | null;
82
+ score: number;
83
+ scoredFrameworks: number;
84
+ frameworks: FrameworkReport[];
85
+ omitted: Array<{
86
+ framework: string;
87
+ name: string;
88
+ why: string;
89
+ }>;
90
+ evidenceMissing: string[];
91
+ }
92
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAA;AAC1D,MAAM,WAAW,GAAG;IAAG,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE;AACvI,MAAM,WAAW,OAAO;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAA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perty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "@connexum/agent-standards",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-beta.1",
4
+ "private": false,
5
+ "description": "Standards coverage for any agent on any stack: on the first scan and every scan after, score the agent against OWASP LLM, OWASP Agentic and the My-CC runtime always, and against the frameworks whose My-CC pack is bound to it (HIPAA, PCI DSS, GDPR, EU AI Act, Colorado AI Act, SOC 2, ISO/IEC 42001, NIST AI RMF); frameworks that fit the agent's industry, data or regions but are not bound are documented as recommended, not scored; frameworks that do not fit are omitted with the reason. One catalogue JSON drives this package and its Python twin (connexum-agent-standards); a missing fact is 'not checked', never a pass.",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": { ".": { "types": "./dist/index.d.ts", "require": "./dist/index.js", "import": "./dist/index.js" } },
9
+ "scripts": { "build": "tsc", "typecheck": "tsc --noEmit", "test": "npx tsx --test --test-force-exit --test-timeout=120000 tests/*.test.mts" },
10
+ "dependencies": {},
11
+ "devDependencies": { "@types/node": "^20.0.0", "tsx": "^4.19.0", "typescript": "^5.4.0" },
12
+ "engines": { "node": ">=24.0.0" },
13
+ "license": "SEE LICENSE IN ../../LICENSE.md",
14
+ "files": ["dist", "catalogue", "README.md"],
15
+ "publishConfig": { "access": "public" },
16
+ "repository": { "type": "git", "url": "https://github.com/Glasgowlad1/AI-Agents-GS.git", "directory": "packages/agent-standards" }
17
+ }