@taiga-ai/mcp-server 0.39.0-dev.1234 → 0.39.0-dev.1236

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 +125 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29961,6 +29961,115 @@ 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
+ /** A product's chosen frameworks, checked against the definitions on offer. */
30044
+ const frameworkChoicesSchema = array(strictObject({
30045
+ framework: frameworkId,
30046
+ level: levelId.optional()
30047
+ })).max(FRAMEWORK_DEFINITIONS.length).superRefine((choices, ctx) => {
30048
+ const problem = frameworkChoicesProblem(choices);
30049
+ if (problem) ctx.addIssue({
30050
+ code: "custom",
30051
+ message: problem
30052
+ });
30053
+ });
30054
+ /** A factory's floor, checked the same way. */
30055
+ const frameworkFloorSchema = array(strictObject({
30056
+ framework: frameworkId,
30057
+ minLevel: levelId.optional()
30058
+ })).max(FRAMEWORK_DEFINITIONS.length).superRefine((floor, ctx) => {
30059
+ const problem = frameworkFloorProblem(floor);
30060
+ if (problem) ctx.addIssue({
30061
+ code: "custom",
30062
+ message: problem
30063
+ });
30064
+ });
30065
+ /** A product's industry: one of the industries on offer. */
30066
+ const productIndustrySchema = _enum(SUPPORTED_INDUSTRIES);
30067
+ strictObject({
30068
+ industry: productIndustrySchema.optional(),
30069
+ 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(),
30070
+ scopeAnswers: partialRecord(_enum(SCOPE_TRIGGERS), _enum(SCOPE_ANSWER_VALUES)).optional()
30071
+ });
30072
+ //#endregion
29964
30073
  //#region ../../packages/types/dist/custom-documents.js
29965
30074
  /**
29966
30075
  * Shared types for the custom-documents feature: customer-uploaded reference
@@ -30765,6 +30874,17 @@ strictObject({
30765
30874
  description: string$2().max(2e3).optional(),
30766
30875
  target: uiConceptPick.optional()
30767
30876
  });
30877
+ object({
30878
+ industry: _enum(SUPPORTED_INDUSTRIES).nullable(),
30879
+ frameworks: array(object({
30880
+ framework: string$2(),
30881
+ level: string$2().optional()
30882
+ }))
30883
+ });
30884
+ object({ floor: array(object({
30885
+ framework: string$2(),
30886
+ minLevel: string$2().optional()
30887
+ })) });
30768
30888
  strictObject({
30769
30889
  screen: string$2().min(1).max(2e3),
30770
30890
  variantCount: number$1().int().min(1).max(3),
@@ -30781,7 +30901,10 @@ strictObject({
30781
30901
  "empty_states",
30782
30902
  "forms"
30783
30903
  ]).nullish()
30784
- }), strictObject({ source: string$2().min(1).max(102400) }), strictObject({ linkId: string$2().uuid().optional() }), strictObject({
30904
+ }), strictObject({ source: string$2().min(1).max(102400) }), strictObject({
30905
+ industry: productIndustrySchema.nullable().optional(),
30906
+ frameworks: frameworkChoicesSchema.optional()
30907
+ }).refine(({ industry, frameworks }) => industry !== void 0 || frameworks !== void 0, { message: "Provide the industry or the frameworks to change" }), strictObject({ linkId: string$2().uuid().optional() }), strictObject({
30785
30908
  kind: _enum(ACCESS_REQUEST_KINDS),
30786
30909
  linkId: string$2().uuid().optional()
30787
30910
  }), object({ sent: boolean() }), strictObject({ type: productDocumentType }), object({
@@ -30956,7 +31079,7 @@ object({
30956
31079
  });
30957
31080
  /** A factory document type, its legacy name read as the current one. */
30958
31081
  const factoryDocumentType = _enum([...FACTORY_DOCUMENT_TYPES, LEGACY_FACTORY_INSTRUCTIONS_TYPE]).transform((type) => type === "team_instructions" ? FACTORY_INSTRUCTIONS_TYPE : type);
30959
- strictObject({ type: factoryDocumentType }), strictObject({ type: factoryDocumentType });
31082
+ strictObject({ floor: frameworkFloorSchema }), strictObject({ type: factoryDocumentType }), strictObject({ type: factoryDocumentType });
30960
31083
  /**
30961
31084
  * A registry scope: an npm scope ("@acme") or a Go module path prefix
30962
31085
  * ("github.com/acme"), as `POST /registries` takes one (PRO-3670). Which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.39.0-dev.1234",
3
+ "version": "0.39.0-dev.1236",
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",