@taiga-ai/mcp-server 0.39.0-dev.1233 → 0.39.0-dev.1235

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.
Files changed (2) hide show
  1. package/dist/index.js +144 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26634,6 +26634,43 @@ const EVIDENCE_OWNERS = [
26634
26634
  "organisation"
26635
26635
  ];
26636
26636
  /**
26637
+ * What kind of source a regulation row is (PRO-5047). The kind says why the
26638
+ * row binds, never whether it applies: that is the context's and the scope
26639
+ * answers'.
26640
+ *
26641
+ * - `law`: legislation, in the jurisdiction's official code or gazette: an
26642
+ * act, an EU regulation or directive, a decree or statutory instrument,
26643
+ * a codified federal or state regulation (CFR). A bill is a law that is
26644
+ * `pending`.
26645
+ * - `authority_regulation`: a binding rule a supervisory authority issues
26646
+ * in its own series under a power an act gives it (THL määräys, PTSFS).
26647
+ * It follows that act, so it names it in `bindsThrough`.
26648
+ * - `harmonised_standard`: a standard whose reference the EU has published
26649
+ * in the Official Journal for an act; following it presumes conformity
26650
+ * with that act, named in `bindsThrough`.
26651
+ * - `authority_guidance`: an authority's guidance, circular or policy: not
26652
+ * legislation. It says how the authority reads or applies the law, and
26653
+ * may bind the administration it is addressed to.
26654
+ * - `contractual`: binds when a customer, a card scheme or a sector
26655
+ * agreement requires it by contract (PCI DSS, Normen).
26656
+ * - `audit_criteria`: a criteria set an authority or a customer audits
26657
+ * against (KATAKRI, Julkri).
26658
+ * - `technical_standard`: a standard that binds only where a law, a rule or
26659
+ * a contract refers to it (HL7 FHIR, IEC 62304).
26660
+ * - `framework`: a control or assurance framework an organization chooses
26661
+ * to follow (ISO/IEC 27001, SOC 2).
26662
+ */
26663
+ const REGULATION_KINDS = [
26664
+ "law",
26665
+ "authority_regulation",
26666
+ "harmonised_standard",
26667
+ "authority_guidance",
26668
+ "contractual",
26669
+ "audit_criteria",
26670
+ "technical_standard",
26671
+ "framework"
26672
+ ];
26673
+ /**
26637
26674
  * How far Taiga's controls answer one requirement of a framework an
26638
26675
  * organization follows (PRO-4405, PRO-4413):
26639
26676
  *
@@ -29924,6 +29961,111 @@ const IAC_PHRASES = [
29924
29961
  new RegExp(`^\\|\\s*(${CONTROL_ID_SOURCE})\\s*\\|\\s*(.*?)\\s*(?:\\||$)`);
29925
29962
  REALITY_DERIVED_DOCUMENT_TYPES.filter((t) => t !== "codebase_snapshot");
29926
29963
  //#endregion
29964
+ //#region ../../packages/types/dist/product-requirements.js
29965
+ /**
29966
+ * Where a product's requirements are stored (PRO-5046, PRO-5048): the
29967
+ * industry and the frameworks a product holds for itself, the floor its
29968
+ * factory sets, and the defaults the organization gives a new product.
29969
+ *
29970
+ * Storage only. What a product is held to is still computed from the
29971
+ * organization until the resolver reads these (PRO-5049). Every value here is
29972
+ * read and written only while the `productRequirements` flag is on.
29973
+ */
29974
+ /** The frameworks that have levels. A new one is added here and nowhere else. */
29975
+ const LEVELLED_FRAMEWORKS = [{
29976
+ id: "owasp-asvs",
29977
+ levels: [
29978
+ {
29979
+ id: "l1",
29980
+ layer: "owasp-asvs-l1"
29981
+ },
29982
+ {
29983
+ id: "l2",
29984
+ layer: "owasp-asvs-l2"
29985
+ },
29986
+ {
29987
+ id: "l3",
29988
+ layer: "owasp-asvs-l3"
29989
+ }
29990
+ ]
29991
+ }];
29992
+ /**
29993
+ * Every framework on offer to a product or a factory: each layer of
29994
+ * `COMPLIANCE_FRAMEWORKS` by its own id, except the layers that are levels of
29995
+ * one framework, which are offered once with their levels.
29996
+ */
29997
+ const FRAMEWORK_DEFINITIONS = (() => {
29998
+ const levelLayers = new Set(LEVELLED_FRAMEWORKS.flatMap((definition) => (definition.levels ?? []).map((level) => level.layer)));
29999
+ return [...COMPLIANCE_FRAMEWORKS.filter((id) => !levelLayers.has(id)).map((id) => ({ id })), ...LEVELLED_FRAMEWORKS];
30000
+ })();
30001
+ const definitionOf = (framework, definitions) => definitions.find((definition) => definition.id === framework);
30002
+ /** A level's position in its framework, lowest first; -1 for a level the framework does not list. */
30003
+ function levelRank(definition, level) {
30004
+ return (definition.levels ?? []).findIndex((candidate) => candidate.id === level);
30005
+ }
30006
+ /**
30007
+ * Why a framework and its level cannot be stored, or null when they can: the
30008
+ * framework is one on offer, a level is given exactly when the framework has
30009
+ * levels, and it is one of them.
30010
+ */
30011
+ function frameworkLevelProblem(framework, level, definitions = FRAMEWORK_DEFINITIONS) {
30012
+ const definition = definitionOf(framework, definitions);
30013
+ if (!definition) return `${framework} is not a framework on offer`;
30014
+ if (!definition.levels) return level === void 0 ? null : `${framework} has no levels`;
30015
+ if (level === void 0) return `${framework} needs a level`;
30016
+ return levelRank(definition, level) >= 0 ? null : `${level} is not a level of ${framework}`;
30017
+ }
30018
+ /** The first problem in a list of choices or floor entries, a framework named twice included; null when none. */
30019
+ function listProblem(entries, definitions) {
30020
+ const seen = /* @__PURE__ */ new Set();
30021
+ for (const { framework, level } of entries) {
30022
+ const problem = frameworkLevelProblem(framework, level, definitions);
30023
+ if (problem) return problem;
30024
+ if (seen.has(framework)) return `${framework} is listed twice`;
30025
+ seen.add(framework);
30026
+ }
30027
+ return null;
30028
+ }
30029
+ function frameworkChoicesProblem(choices, definitions = FRAMEWORK_DEFINITIONS) {
30030
+ return listProblem(choices.map(({ framework, level }) => ({
30031
+ framework,
30032
+ level
30033
+ })), definitions);
30034
+ }
30035
+ function frameworkFloorProblem(floor, definitions = FRAMEWORK_DEFINITIONS) {
30036
+ return listProblem(floor.map(({ framework, minLevel }) => ({
30037
+ framework,
30038
+ level: minLevel
30039
+ })), definitions);
30040
+ }
30041
+ const frameworkId = string$2().min(1).max(40);
30042
+ const levelId = string$2().min(1).max(20);
30043
+ array(strictObject({
30044
+ framework: frameworkId,
30045
+ level: levelId.optional()
30046
+ })).max(FRAMEWORK_DEFINITIONS.length).superRefine((choices, ctx) => {
30047
+ const problem = frameworkChoicesProblem(choices);
30048
+ if (problem) ctx.addIssue({
30049
+ code: "custom",
30050
+ message: problem
30051
+ });
30052
+ });
30053
+ array(strictObject({
30054
+ framework: frameworkId,
30055
+ minLevel: levelId.optional()
30056
+ })).max(FRAMEWORK_DEFINITIONS.length).superRefine((floor, ctx) => {
30057
+ const problem = frameworkFloorProblem(floor);
30058
+ if (problem) ctx.addIssue({
30059
+ code: "custom",
30060
+ message: problem
30061
+ });
30062
+ });
30063
+ strictObject({
30064
+ industry: _enum(SUPPORTED_INDUSTRIES).optional(),
30065
+ marketCountries: array(string$2().length(2).refine((code) => ISO_COUNTRIES.some((country) => country.code === code), "Not an ISO 3166 country code")).max(ISO_COUNTRIES.length).refine((codes) => new Set(codes).size === codes.length, "A country is listed twice").optional(),
30066
+ scopeAnswers: partialRecord(_enum(SCOPE_TRIGGERS), _enum(SCOPE_ANSWER_VALUES)).optional()
30067
+ });
30068
+ //#endregion
29927
30069
  //#region ../../packages/types/dist/custom-documents.js
29928
30070
  /**
29929
30071
  * Shared types for the custom-documents feature: customer-uploaded reference
@@ -30600,6 +30742,8 @@ object({
30600
30742
  scope: string$2(),
30601
30743
  keyRequirements: string$2(),
30602
30744
  citation: string$2().nullable(),
30745
+ kind: _enum(REGULATION_KINDS).optional(),
30746
+ bindsThrough: string$2().nullable().optional(),
30603
30747
  status: _enum(FRAMEWORK_STATUSES),
30604
30748
  effectiveFrom: string$2().nullable(),
30605
30749
  statusUntil: string$2().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.39.0-dev.1233",
3
+ "version": "0.39.0-dev.1235",
4
4
  "description": "Taiga for AI coding assistants: read products, policies, initiatives and runs, and operate the line, over MCP",
5
5
  "mcpName": "ga.tai/mcp-server",
6
6
  "license": "UNLICENSED",