@taiga-ai/mcp-server 0.39.0-dev.1234 → 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.
- package/dist/index.js +105 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29961,6 +29961,111 @@ const IAC_PHRASES = [
|
|
|
29961
29961
|
new RegExp(`^\\|\\s*(${CONTROL_ID_SOURCE})\\s*\\|\\s*(.*?)\\s*(?:\\||$)`);
|
|
29962
29962
|
REALITY_DERIVED_DOCUMENT_TYPES.filter((t) => t !== "codebase_snapshot");
|
|
29963
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
|
|
29964
30069
|
//#region ../../packages/types/dist/custom-documents.js
|
|
29965
30070
|
/**
|
|
29966
30071
|
* Shared types for the custom-documents feature: customer-uploaded reference
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.39.0-dev.
|
|
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",
|