@taiga-ai/mcp-server 0.39.0 → 0.39.1-dev.1237
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 +10 -10
- package/dist/index.js +266 -61
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ You need an access key, made in Taiga under **Settings > Account > MCP**, where
|
|
|
14
14
|
|
|
15
15
|
Create the key first, and choose when it expires: in 30 days, 90 days, a year, or never. Taiga copies it to your clipboard, shows it once, and keeps it on the page until you say you have saved it, so copying the setup next does not lose it.
|
|
16
16
|
|
|
17
|
-
The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.39.
|
|
17
|
+
The same page shows the setup for your client and environment, with the key already filled in where a config file needs it, and a one-click install for Cursor. The examples here pin a release (`@taiga-ai/mcp-server@0.39.1`), so an install runs the version you chose rather than whatever `latest` is at the next start.
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -23,29 +23,29 @@ The same page shows the setup for your client and environment, with the key alre
|
|
|
23
23
|
Run the command. When it asks for your access key, paste it once and press Enter. Nothing appears as you paste (PowerShell shows asterisks), and the key stays out of your shell history:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.
|
|
26
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && claude mcp add taiga --scope user -e TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.1
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.
|
|
30
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && codex mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.1
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.
|
|
34
|
+
printf 'Taiga access key: ' && read -rs TAIGA_API_KEY && echo && copilot mcp add taiga --env TAIGA_API_KEY="$TAIGA_API_KEY" -- npx -y @taiga-ai/mcp-server@0.39.1
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
On Windows, in PowerShell (Claude Code and Copilot start `npx` through `cmd /c`; the quoted `'--'` survives npm's PowerShell shims):
|
|
38
38
|
|
|
39
39
|
```powershell
|
|
40
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.39.
|
|
40
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; claude mcp add taiga --scope user -e "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.39.1
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
```powershell
|
|
44
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.39.
|
|
44
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; codex mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' npx -y @taiga-ai/mcp-server@0.39.1
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
```powershell
|
|
48
|
-
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.39.
|
|
48
|
+
$k = Read-Host 'Taiga access key' -AsSecureString; copilot mcp add taiga --env "TAIGA_API_KEY=$([Net.NetworkCredential]::new('', $k).Password)" '--' cmd /c npx -y @taiga-ai/mcp-server@0.39.1
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
The Copilot command also sets up the GitHub Copilot app. If you have the app but no `copilot` command, add the server to `~/.copilot/mcp-config.json` instead, beside any servers already there. It holds your key, so keep it out of repositories:
|
|
@@ -56,7 +56,7 @@ The Copilot command also sets up the GitHub Copilot app. If you have the app but
|
|
|
56
56
|
"taiga": {
|
|
57
57
|
"type": "local",
|
|
58
58
|
"command": "npx",
|
|
59
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.39.
|
|
59
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.39.1"],
|
|
60
60
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" },
|
|
61
61
|
"tools": ["*"]
|
|
62
62
|
}
|
|
@@ -73,7 +73,7 @@ Most clients read the same `mcpServers` block. Add it with your key in place of
|
|
|
73
73
|
"mcpServers": {
|
|
74
74
|
"taiga": {
|
|
75
75
|
"command": "npx",
|
|
76
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.39.
|
|
76
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.39.1"],
|
|
77
77
|
"env": { "TAIGA_API_KEY": "YOUR_ACCESS_KEY" }
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -101,7 +101,7 @@ In `.vscode/mcp.json`. VS Code reads `servers`, and prompts for the key once and
|
|
|
101
101
|
"taiga": {
|
|
102
102
|
"type": "stdio",
|
|
103
103
|
"command": "npx",
|
|
104
|
-
"args": ["-y", "@taiga-ai/mcp-server@0.39.
|
|
104
|
+
"args": ["-y", "@taiga-ai/mcp-server@0.39.1"],
|
|
105
105
|
"env": { "TAIGA_API_KEY": "${input:taiga-api-key}" }
|
|
106
106
|
}
|
|
107
107
|
}
|
package/dist/index.js
CHANGED
|
@@ -24157,8 +24157,12 @@ var TaigaClient = class {
|
|
|
24157
24157
|
async getProductSetupBlockers(productId) {
|
|
24158
24158
|
return this.request("GET", `/products/${seg(productId)}/setup`);
|
|
24159
24159
|
}
|
|
24160
|
-
|
|
24161
|
-
|
|
24160
|
+
/**
|
|
24161
|
+
* Always with a body (PRO-4986): the route's body is optional, yet a POST with none was refused on staging
|
|
24162
|
+
* ("expected object, received null") before the handler ran, while `{}` passes.
|
|
24163
|
+
*/
|
|
24164
|
+
async completeSetup(productId, options = {}) {
|
|
24165
|
+
return this.request("POST", `/products/${seg(productId)}/setup/complete`, options);
|
|
24162
24166
|
}
|
|
24163
24167
|
async reopenSetup(productId) {
|
|
24164
24168
|
return this.request("POST", `/products/${seg(productId)}/setup/reopen`);
|
|
@@ -25191,6 +25195,21 @@ const optionalUuid = string$2().uuid().optional();
|
|
|
25191
25195
|
*/
|
|
25192
25196
|
const optionalLineAnchor = number$1().int().min(0).optional().transform((v) => v ? v : void 0);
|
|
25193
25197
|
//#endregion
|
|
25198
|
+
//#region ../../packages/types/dist/iam.js
|
|
25199
|
+
const JOB_FUNCTIONS = [
|
|
25200
|
+
"product",
|
|
25201
|
+
"engineering",
|
|
25202
|
+
"design",
|
|
25203
|
+
"leadership",
|
|
25204
|
+
"operations",
|
|
25205
|
+
"other"
|
|
25206
|
+
];
|
|
25207
|
+
const TECHNICAL_PROFICIENCIES = [
|
|
25208
|
+
"non_technical",
|
|
25209
|
+
"semi_technical",
|
|
25210
|
+
"technical"
|
|
25211
|
+
];
|
|
25212
|
+
//#endregion
|
|
25194
25213
|
//#region ../../packages/types/dist/entitlements.js
|
|
25195
25214
|
/**
|
|
25196
25215
|
* Which agent implementation serves a planning job or build run (PRO-1331).
|
|
@@ -26619,6 +26638,43 @@ const EVIDENCE_OWNERS = [
|
|
|
26619
26638
|
"organisation"
|
|
26620
26639
|
];
|
|
26621
26640
|
/**
|
|
26641
|
+
* What kind of source a regulation row is (PRO-5047). The kind says why the
|
|
26642
|
+
* row binds, never whether it applies: that is the context's and the scope
|
|
26643
|
+
* answers'.
|
|
26644
|
+
*
|
|
26645
|
+
* - `law`: legislation, in the jurisdiction's official code or gazette: an
|
|
26646
|
+
* act, an EU regulation or directive, a decree or statutory instrument,
|
|
26647
|
+
* a codified federal or state regulation (CFR). A bill is a law that is
|
|
26648
|
+
* `pending`.
|
|
26649
|
+
* - `authority_regulation`: a binding rule a supervisory authority issues
|
|
26650
|
+
* in its own series under a power an act gives it (THL määräys, PTSFS).
|
|
26651
|
+
* It follows that act, so it names it in `bindsThrough`.
|
|
26652
|
+
* - `harmonised_standard`: a standard whose reference the EU has published
|
|
26653
|
+
* in the Official Journal for an act; following it presumes conformity
|
|
26654
|
+
* with that act, named in `bindsThrough`.
|
|
26655
|
+
* - `authority_guidance`: an authority's guidance, circular or policy: not
|
|
26656
|
+
* legislation. It says how the authority reads or applies the law, and
|
|
26657
|
+
* may bind the administration it is addressed to.
|
|
26658
|
+
* - `contractual`: binds when a customer, a card scheme or a sector
|
|
26659
|
+
* agreement requires it by contract (PCI DSS, Normen).
|
|
26660
|
+
* - `audit_criteria`: a criteria set an authority or a customer audits
|
|
26661
|
+
* against (KATAKRI, Julkri).
|
|
26662
|
+
* - `technical_standard`: a standard that binds only where a law, a rule or
|
|
26663
|
+
* a contract refers to it (HL7 FHIR, IEC 62304).
|
|
26664
|
+
* - `framework`: a control or assurance framework an organization chooses
|
|
26665
|
+
* to follow (ISO/IEC 27001, SOC 2).
|
|
26666
|
+
*/
|
|
26667
|
+
const REGULATION_KINDS = [
|
|
26668
|
+
"law",
|
|
26669
|
+
"authority_regulation",
|
|
26670
|
+
"harmonised_standard",
|
|
26671
|
+
"authority_guidance",
|
|
26672
|
+
"contractual",
|
|
26673
|
+
"audit_criteria",
|
|
26674
|
+
"technical_standard",
|
|
26675
|
+
"framework"
|
|
26676
|
+
];
|
|
26677
|
+
/**
|
|
26622
26678
|
* How far Taiga's controls answer one requirement of a framework an
|
|
26623
26679
|
* organization follows (PRO-4405, PRO-4413):
|
|
26624
26680
|
*
|
|
@@ -29619,7 +29675,7 @@ const ATTESTATION_LINK_MAX_LENGTH = 2e3;
|
|
|
29619
29675
|
*/
|
|
29620
29676
|
function isAttestationLink(value) {
|
|
29621
29677
|
if (value.length === 0 || value.length > 2e3) return false;
|
|
29622
|
-
if (/[\s<>"]/.test(value) ||
|
|
29678
|
+
if (/[\s<>"]/.test(value) || Array.from(value).some((char) => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127)) return false;
|
|
29623
29679
|
try {
|
|
29624
29680
|
const url = new URL(value);
|
|
29625
29681
|
return (url.protocol === "https:" || url.protocol === "http:") && url.hostname.length > 0;
|
|
@@ -29909,6 +29965,115 @@ const IAC_PHRASES = [
|
|
|
29909
29965
|
new RegExp(`^\\|\\s*(${CONTROL_ID_SOURCE})\\s*\\|\\s*(.*?)\\s*(?:\\||$)`);
|
|
29910
29966
|
REALITY_DERIVED_DOCUMENT_TYPES.filter((t) => t !== "codebase_snapshot");
|
|
29911
29967
|
//#endregion
|
|
29968
|
+
//#region ../../packages/types/dist/product-requirements.js
|
|
29969
|
+
/**
|
|
29970
|
+
* Where a product's requirements are stored (PRO-5046, PRO-5048): the
|
|
29971
|
+
* industry and the frameworks a product holds for itself, the floor its
|
|
29972
|
+
* factory sets, and the defaults the organization gives a new product.
|
|
29973
|
+
*
|
|
29974
|
+
* Storage only. What a product is held to is still computed from the
|
|
29975
|
+
* organization until the resolver reads these (PRO-5049). Every value here is
|
|
29976
|
+
* read and written only while the `productRequirements` flag is on.
|
|
29977
|
+
*/
|
|
29978
|
+
/** The frameworks that have levels. A new one is added here and nowhere else. */
|
|
29979
|
+
const LEVELLED_FRAMEWORKS = [{
|
|
29980
|
+
id: "owasp-asvs",
|
|
29981
|
+
levels: [
|
|
29982
|
+
{
|
|
29983
|
+
id: "l1",
|
|
29984
|
+
layer: "owasp-asvs-l1"
|
|
29985
|
+
},
|
|
29986
|
+
{
|
|
29987
|
+
id: "l2",
|
|
29988
|
+
layer: "owasp-asvs-l2"
|
|
29989
|
+
},
|
|
29990
|
+
{
|
|
29991
|
+
id: "l3",
|
|
29992
|
+
layer: "owasp-asvs-l3"
|
|
29993
|
+
}
|
|
29994
|
+
]
|
|
29995
|
+
}];
|
|
29996
|
+
/**
|
|
29997
|
+
* Every framework on offer to a product or a factory: each layer of
|
|
29998
|
+
* `COMPLIANCE_FRAMEWORKS` by its own id, except the layers that are levels of
|
|
29999
|
+
* one framework, which are offered once with their levels.
|
|
30000
|
+
*/
|
|
30001
|
+
const FRAMEWORK_DEFINITIONS = (() => {
|
|
30002
|
+
const levelLayers = new Set(LEVELLED_FRAMEWORKS.flatMap((definition) => (definition.levels ?? []).map((level) => level.layer)));
|
|
30003
|
+
return [...COMPLIANCE_FRAMEWORKS.filter((id) => !levelLayers.has(id)).map((id) => ({ id })), ...LEVELLED_FRAMEWORKS];
|
|
30004
|
+
})();
|
|
30005
|
+
const definitionOf = (framework, definitions) => definitions.find((definition) => definition.id === framework);
|
|
30006
|
+
/** A level's position in its framework, lowest first; -1 for a level the framework does not list. */
|
|
30007
|
+
function levelRank(definition, level) {
|
|
30008
|
+
return (definition.levels ?? []).findIndex((candidate) => candidate.id === level);
|
|
30009
|
+
}
|
|
30010
|
+
/**
|
|
30011
|
+
* Why a framework and its level cannot be stored, or null when they can: the
|
|
30012
|
+
* framework is one on offer, a level is given exactly when the framework has
|
|
30013
|
+
* levels, and it is one of them.
|
|
30014
|
+
*/
|
|
30015
|
+
function frameworkLevelProblem(framework, level, definitions = FRAMEWORK_DEFINITIONS) {
|
|
30016
|
+
const definition = definitionOf(framework, definitions);
|
|
30017
|
+
if (!definition) return `${framework} is not a framework on offer`;
|
|
30018
|
+
if (!definition.levels) return level === void 0 ? null : `${framework} has no levels`;
|
|
30019
|
+
if (level === void 0) return `${framework} needs a level`;
|
|
30020
|
+
return levelRank(definition, level) >= 0 ? null : `${level} is not a level of ${framework}`;
|
|
30021
|
+
}
|
|
30022
|
+
/** The first problem in a list of choices or floor entries, a framework named twice included; null when none. */
|
|
30023
|
+
function listProblem(entries, definitions) {
|
|
30024
|
+
const seen = /* @__PURE__ */ new Set();
|
|
30025
|
+
for (const { framework, level } of entries) {
|
|
30026
|
+
const problem = frameworkLevelProblem(framework, level, definitions);
|
|
30027
|
+
if (problem) return problem;
|
|
30028
|
+
if (seen.has(framework)) return `${framework} is listed twice`;
|
|
30029
|
+
seen.add(framework);
|
|
30030
|
+
}
|
|
30031
|
+
return null;
|
|
30032
|
+
}
|
|
30033
|
+
function frameworkChoicesProblem(choices, definitions = FRAMEWORK_DEFINITIONS) {
|
|
30034
|
+
return listProblem(choices.map(({ framework, level }) => ({
|
|
30035
|
+
framework,
|
|
30036
|
+
level
|
|
30037
|
+
})), definitions);
|
|
30038
|
+
}
|
|
30039
|
+
function frameworkFloorProblem(floor, definitions = FRAMEWORK_DEFINITIONS) {
|
|
30040
|
+
return listProblem(floor.map(({ framework, minLevel }) => ({
|
|
30041
|
+
framework,
|
|
30042
|
+
level: minLevel
|
|
30043
|
+
})), definitions);
|
|
30044
|
+
}
|
|
30045
|
+
const frameworkId = string$2().min(1).max(40);
|
|
30046
|
+
const levelId = string$2().min(1).max(20);
|
|
30047
|
+
/** A product's chosen frameworks, checked against the definitions on offer. */
|
|
30048
|
+
const frameworkChoicesSchema = array(strictObject({
|
|
30049
|
+
framework: frameworkId,
|
|
30050
|
+
level: levelId.optional()
|
|
30051
|
+
})).max(FRAMEWORK_DEFINITIONS.length).superRefine((choices, ctx) => {
|
|
30052
|
+
const problem = frameworkChoicesProblem(choices);
|
|
30053
|
+
if (problem) ctx.addIssue({
|
|
30054
|
+
code: "custom",
|
|
30055
|
+
message: problem
|
|
30056
|
+
});
|
|
30057
|
+
});
|
|
30058
|
+
/** A factory's floor, checked the same way. */
|
|
30059
|
+
const frameworkFloorSchema = array(strictObject({
|
|
30060
|
+
framework: frameworkId,
|
|
30061
|
+
minLevel: levelId.optional()
|
|
30062
|
+
})).max(FRAMEWORK_DEFINITIONS.length).superRefine((floor, ctx) => {
|
|
30063
|
+
const problem = frameworkFloorProblem(floor);
|
|
30064
|
+
if (problem) ctx.addIssue({
|
|
30065
|
+
code: "custom",
|
|
30066
|
+
message: problem
|
|
30067
|
+
});
|
|
30068
|
+
});
|
|
30069
|
+
/** A product's industry: one of the industries on offer. */
|
|
30070
|
+
const productIndustrySchema = _enum(SUPPORTED_INDUSTRIES);
|
|
30071
|
+
strictObject({
|
|
30072
|
+
industry: productIndustrySchema.optional(),
|
|
30073
|
+
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(),
|
|
30074
|
+
scopeAnswers: partialRecord(_enum(SCOPE_TRIGGERS), _enum(SCOPE_ANSWER_VALUES)).optional()
|
|
30075
|
+
});
|
|
30076
|
+
//#endregion
|
|
29912
30077
|
//#region ../../packages/types/dist/custom-documents.js
|
|
29913
30078
|
/**
|
|
29914
30079
|
* Shared types for the custom-documents feature: customer-uploaded reference
|
|
@@ -30585,6 +30750,8 @@ object({
|
|
|
30585
30750
|
scope: string$2(),
|
|
30586
30751
|
keyRequirements: string$2(),
|
|
30587
30752
|
citation: string$2().nullable(),
|
|
30753
|
+
kind: _enum(REGULATION_KINDS).optional(),
|
|
30754
|
+
bindsThrough: string$2().nullable().optional(),
|
|
30588
30755
|
status: _enum(FRAMEWORK_STATUSES),
|
|
30589
30756
|
effectiveFrom: string$2().nullable(),
|
|
30590
30757
|
statusUntil: string$2().nullable(),
|
|
@@ -30711,6 +30878,17 @@ strictObject({
|
|
|
30711
30878
|
description: string$2().max(2e3).optional(),
|
|
30712
30879
|
target: uiConceptPick.optional()
|
|
30713
30880
|
});
|
|
30881
|
+
object({
|
|
30882
|
+
industry: _enum(SUPPORTED_INDUSTRIES).nullable(),
|
|
30883
|
+
frameworks: array(object({
|
|
30884
|
+
framework: string$2(),
|
|
30885
|
+
level: string$2().optional()
|
|
30886
|
+
}))
|
|
30887
|
+
});
|
|
30888
|
+
object({ floor: array(object({
|
|
30889
|
+
framework: string$2(),
|
|
30890
|
+
minLevel: string$2().optional()
|
|
30891
|
+
})) });
|
|
30714
30892
|
strictObject({
|
|
30715
30893
|
screen: string$2().min(1).max(2e3),
|
|
30716
30894
|
variantCount: number$1().int().min(1).max(3),
|
|
@@ -30727,7 +30905,10 @@ strictObject({
|
|
|
30727
30905
|
"empty_states",
|
|
30728
30906
|
"forms"
|
|
30729
30907
|
]).nullish()
|
|
30730
|
-
}), strictObject({ source: string$2().min(1).max(102400) }), strictObject({
|
|
30908
|
+
}), strictObject({ source: string$2().min(1).max(102400) }), strictObject({
|
|
30909
|
+
industry: productIndustrySchema.nullable().optional(),
|
|
30910
|
+
frameworks: frameworkChoicesSchema.optional()
|
|
30911
|
+
}).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({
|
|
30731
30912
|
kind: _enum(ACCESS_REQUEST_KINDS),
|
|
30732
30913
|
linkId: string$2().uuid().optional()
|
|
30733
30914
|
}), object({ sent: boolean() }), strictObject({ type: productDocumentType }), object({
|
|
@@ -30840,7 +31021,18 @@ strictObject({
|
|
|
30840
31021
|
trigger: _enum(SCOPE_TRIGGERS),
|
|
30841
31022
|
answer: _enum(SCOPE_ANSWER_VALUES),
|
|
30842
31023
|
note: string$2().trim().max(SCOPE_ANSWER_NOTE_MAX_LENGTH).optional()
|
|
30843
|
-
}), strictObject({ environments: array(string$2()).default(["development"]) }), object({ id: string$2().uuid() }), strictObject({
|
|
31024
|
+
}), strictObject({ environments: array(string$2()).default(["development"]) }), object({ id: string$2().uuid() }), strictObject({
|
|
31025
|
+
ticketId: uuid,
|
|
31026
|
+
/** For a ticket Taiga read as too large: one initiative per piece of its split, all with the ticket's key. */
|
|
31027
|
+
asSplit: boolean().optional(),
|
|
31028
|
+
/**
|
|
31029
|
+
* With `asSplit`: when the assessment whose split the person was shown
|
|
31030
|
+
* was made. Refused when the ticket was assessed again since, so the
|
|
31031
|
+
* pieces written are the ones confirmed. Optional for a tab of a build
|
|
31032
|
+
* that sends none; the server then holds the job to the split it reads.
|
|
31033
|
+
*/
|
|
31034
|
+
splitAssessedAt: string$2().datetime({ offset: true }).optional()
|
|
31035
|
+
}), strictObject({ ticketIds: array(uuid).min(1).max(25) }), strictObject({
|
|
30844
31036
|
connectionId: uuid,
|
|
30845
31037
|
placeId: trackerPlaceId,
|
|
30846
31038
|
filter: ticketSourceFilter.nullable().optional()
|
|
@@ -30860,6 +31052,10 @@ strictObject({
|
|
|
30860
31052
|
*/
|
|
30861
31053
|
const mcpToolsets = array(_enum(MCP_TOOLSETS)).min(1).refine((sets) => new Set(sets).size === sets.length, "Name each toolset once").nullable();
|
|
30862
31054
|
strictObject({
|
|
31055
|
+
name: string$2().min(1).max(255).optional(),
|
|
31056
|
+
jobFunction: _enum(JOB_FUNCTIONS).nullable().optional(),
|
|
31057
|
+
technicalProficiency: _enum(TECHNICAL_PROFICIENCIES).nullable().optional()
|
|
31058
|
+
}).refine((fields) => Object.values(fields).some((value) => value !== void 0), { message: "A correction must change a field" }), strictObject({
|
|
30863
31059
|
key: string$2().regex(new RegExp(`^${API_KEY_PREFIX}[0-9a-f]{64}$`)),
|
|
30864
31060
|
name: string$2().min(1).max(255),
|
|
30865
31061
|
scopes: array(_enum(API_KEY_SCOPES)).optional(),
|
|
@@ -30887,7 +31083,7 @@ object({
|
|
|
30887
31083
|
});
|
|
30888
31084
|
/** A factory document type, its legacy name read as the current one. */
|
|
30889
31085
|
const factoryDocumentType = _enum([...FACTORY_DOCUMENT_TYPES, LEGACY_FACTORY_INSTRUCTIONS_TYPE]).transform((type) => type === "team_instructions" ? FACTORY_INSTRUCTIONS_TYPE : type);
|
|
30890
|
-
strictObject({ type: factoryDocumentType }), strictObject({ type: factoryDocumentType });
|
|
31086
|
+
strictObject({ floor: frameworkFloorSchema }), strictObject({ type: factoryDocumentType }), strictObject({ type: factoryDocumentType });
|
|
30891
31087
|
/**
|
|
30892
31088
|
* A registry scope: an npm scope ("@acme") or a Go module path prefix
|
|
30893
31089
|
* ("github.com/acme"), as `POST /registries` takes one (PRO-3670). Which
|
|
@@ -31477,7 +31673,7 @@ discriminatedUnion("kind", [strictObject({
|
|
|
31477
31673
|
}), strictObject({
|
|
31478
31674
|
kind: literal("initiativeEditApplied"),
|
|
31479
31675
|
proposalMessageId: string$2().uuid()
|
|
31480
|
-
})]);
|
|
31676
|
+
})]), strictObject({ factoryId: string$2().uuid().nullable() });
|
|
31481
31677
|
strictObject({ kind: _enum(["sbom", "notices"]) }), object({
|
|
31482
31678
|
url: string$2().url().nullable(),
|
|
31483
31679
|
expiresAt: string$2().nullable()
|
|
@@ -37609,6 +37805,7 @@ const BY_ARGUMENT = {
|
|
|
37609
37805
|
violationId: "taiga_get_policy_standing lists a product's policy violations.",
|
|
37610
37806
|
environmentId: "taiga_get_deployments lists the product's environments with their IDs; a product ID is not one.",
|
|
37611
37807
|
knowledgeId: "taiga_list_knowledge lists the knowledge files.",
|
|
37808
|
+
assigneeId: "taiga_list_product_people lists the people an initiative in that product can be assigned to.",
|
|
37612
37809
|
productId: "taiga_list_products lists the products the key can see; a name is not an ID (taiga_get_product takes a slug)."
|
|
37613
37810
|
};
|
|
37614
37811
|
/**
|
|
@@ -37646,6 +37843,7 @@ const MISSING_THING = {
|
|
|
37646
37843
|
violationId: /violation/i,
|
|
37647
37844
|
environmentId: /environment/i,
|
|
37648
37845
|
knowledgeId: /knowledge|document/i,
|
|
37846
|
+
assigneeId: /assignee/i,
|
|
37649
37847
|
productId: /\b(product|project) not found/i
|
|
37650
37848
|
};
|
|
37651
37849
|
/** The hint for a 404 from one tool call: the tool's own, else the one for the ID the API says is missing. */
|
|
@@ -38258,26 +38456,28 @@ const GROUP_WHERE = 5;
|
|
|
38258
38456
|
/** What makes two findings one rule's: its rule id for code, infrastructure and secrets, its license verdict for a license. */
|
|
38259
38457
|
/** The scanner's title cap (deps.py _COLUMN_CAP): a title cut there ends in "...". */
|
|
38260
38458
|
const TITLE_CAP = 300;
|
|
38459
|
+
/** A text field of a finding row; '' where the row has none. */
|
|
38460
|
+
const textOf = (value) => typeof value === "string" ? value : "";
|
|
38261
38461
|
/**
|
|
38262
38462
|
* The license verdict of a license finding's title: what follows "<package> <version>: ". A title the scanner cut
|
|
38263
38463
|
* at its cap has no whole verdict, so it folds with nothing: two cut titles could share a prefix and differ.
|
|
38264
38464
|
*/
|
|
38265
38465
|
function licenseVerdict(row) {
|
|
38266
|
-
const title =
|
|
38466
|
+
const title = textOf(row["title"]);
|
|
38267
38467
|
if (title.length >= TITLE_CAP && title.endsWith("...")) return "";
|
|
38268
38468
|
return title.split(": ").slice(1).join(": ");
|
|
38269
38469
|
}
|
|
38270
38470
|
function groupKey(row) {
|
|
38271
|
-
const status =
|
|
38272
|
-
const link =
|
|
38471
|
+
const status = textOf(row["status"]);
|
|
38472
|
+
const link = textOf(row["productRepositoryId"]);
|
|
38273
38473
|
if (row["kind"] === "license_violation") {
|
|
38274
38474
|
const verdict = licenseVerdict(row);
|
|
38275
|
-
const reason =
|
|
38475
|
+
const reason = textOf(row["resolvedReason"] ?? row["previouslyResolvedReason"]);
|
|
38276
38476
|
return verdict ? `license|${status}|${reason}|${link}|${verdict}` : null;
|
|
38277
38477
|
}
|
|
38278
38478
|
const location = row["location"];
|
|
38279
38479
|
const rule = typeof location?.ruleId === "string" ? location.ruleId : null;
|
|
38280
|
-
const decided =
|
|
38480
|
+
const decided = textOf(row["decidedBy"]);
|
|
38281
38481
|
return rule ? `${String(row["kind"])}|${String(row["severity"])}|${status}|${decided}|${link}|${rule}` : null;
|
|
38282
38482
|
}
|
|
38283
38483
|
/**
|
|
@@ -38289,7 +38489,8 @@ function whereOf(row) {
|
|
|
38289
38489
|
const paths = Array.isArray(row["sourcePaths"]) ? row["sourcePaths"] : [];
|
|
38290
38490
|
const file = typeof location?.path === "string" ? location.path : typeof paths[0] === "string" ? paths[0] : null;
|
|
38291
38491
|
if (file) {
|
|
38292
|
-
const
|
|
38492
|
+
const line = location?.line;
|
|
38493
|
+
const at = line && (typeof line === "number" || typeof line === "string") ? `${file}:${line}` : file;
|
|
38293
38494
|
return typeof location?.resource === "string" ? `${at} ${location.resource}` : at;
|
|
38294
38495
|
}
|
|
38295
38496
|
return [row["packageName"], row["currentVersion"]].filter(Boolean).join(" ") || String(row["id"]);
|
|
@@ -38334,7 +38535,7 @@ function grouped(rows, fold) {
|
|
|
38334
38535
|
const first = members[0];
|
|
38335
38536
|
const shared = Object.fromEntries(Object.entries(first).filter(([key, value]) => key !== "id" && key !== "title" && members.every((member) => JSON.stringify(member[key]) === JSON.stringify(value))));
|
|
38336
38537
|
const location = first["location"];
|
|
38337
|
-
const words = sharedTitle(members.map((member) =>
|
|
38538
|
+
const words = sharedTitle(members.map((member) => textOf(member["title"])));
|
|
38338
38539
|
const rule = typeof location?.ruleId === "string" ? location.ruleId : null;
|
|
38339
38540
|
const said = first["kind"] === "license_violation" ? licenseVerdict(first) : words ? rule && !words.includes(rule) ? `${rule}: ${words}` : words : rule ?? String(first["title"]);
|
|
38340
38541
|
return {
|
|
@@ -38420,7 +38621,7 @@ function withFixability(row) {
|
|
|
38420
38621
|
fixNote: baseImageWaitNote(base)
|
|
38421
38622
|
};
|
|
38422
38623
|
}
|
|
38423
|
-
if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"]
|
|
38624
|
+
if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"] && row["status"] === "open" ? {
|
|
38424
38625
|
...row,
|
|
38425
38626
|
fixable: true,
|
|
38426
38627
|
fixNote: "taiga_fix_finding moves the base images it is in to the builds their tags name now, the FROM line alone, with every other advisory that move removes."
|
|
@@ -38641,7 +38842,7 @@ function standingSummary(standing) {
|
|
|
38641
38842
|
const listed = controls.filter((c) => Number(c["divergenceCount"] ?? 0) > 0 || Number(c["findingCount"] ?? 0) > 0);
|
|
38642
38843
|
const bySeverity = {};
|
|
38643
38844
|
for (const violation of violations) {
|
|
38644
|
-
const severity =
|
|
38845
|
+
const severity = typeof violation["severity"] === "string" ? violation["severity"] : "unknown";
|
|
38645
38846
|
bySeverity[severity] = (bySeverity[severity] ?? 0) + 1;
|
|
38646
38847
|
}
|
|
38647
38848
|
const stated = (state) => controls.filter((c) => c["state"] === state).length;
|
|
@@ -38941,17 +39142,17 @@ function registerMaintenanceTools(server, client) {
|
|
|
38941
39142
|
const standing = (await client.getPolicyStanding(params.productId)).data;
|
|
38942
39143
|
const controls = Array.isArray(standing.controls) ? standing.controls : [];
|
|
38943
39144
|
const violations = Array.isArray(standing.divergences) ? standing.divergences : [];
|
|
38944
|
-
const listed = controls.filter((c) =>
|
|
39145
|
+
const listed = controls.filter((c) => (c.divergenceCount ?? 0) > 0 || (c.findingCount ?? 0) > 0);
|
|
38945
39146
|
const summary = standingSummary(standing);
|
|
38946
39147
|
const assessment = standing.assessment;
|
|
38947
39148
|
const assessedAt = typeof assessment?.assessedAt === "string" ? assessment.assessedAt : null;
|
|
38948
|
-
const note = assessment?.state === "never" ? "Never assessed: the documents have not been checked against the policies yet, so nothing here is an all-clear. " + (standing.canAssess
|
|
39149
|
+
const note = assessment?.state === "never" ? "Never assessed: the documents have not been checked against the policies yet, so nothing here is an all-clear. " + (!standing.canAssess && standing.hasPolicies ? "It has no reality documents to assess yet: an import derives them (taiga_start_import for a product set up from its code, paid work: ask first), and the assessment follows." : "An assessment runs when the reality documents are derived or refreshed (taiga_refresh_reality_documents, paid work: ask first).") : summary.controlsMet + summary.controlsNotApplicable === 0 && assessedAt ? `No control is recorded as met or not applicable: the last assessment (${assessedAt}) either ran before assessments recorded those verdicts, or found none. Until the next one, only violations are known; the rest are not assessed, which is no pass.` : null;
|
|
38949
39150
|
const resolvedAny = Array.isArray(standing.resolvedDivergences) && standing.resolvedDivergences.length > 0;
|
|
38950
39151
|
const wording = violations.length > 0 || resolvedAny ? { wordingNote: "A violation's evidence is from its assessedAt; its title and summary may be from when it was first recorded. Where they disagree, the evidence is current." } : {};
|
|
38951
39152
|
if (params.controlId && params.violationId) return toolError("VALIDATION_ERROR", "Name either a control (controlId) or one violation (violationId), not both.");
|
|
38952
39153
|
if (params.controlId) {
|
|
38953
39154
|
const wanted = params.controlId.toUpperCase();
|
|
38954
|
-
const control = controls.find((c) =>
|
|
39155
|
+
const control = controls.find((c) => c.controlId.toUpperCase() === wanted);
|
|
38955
39156
|
if (!control) return toolError("NOT_FOUND", "No control with that id in this product's policies; taiga_get_organization_document (type, sections: []) lists a policy's controls.");
|
|
38956
39157
|
const own = violations.filter((violation) => String(violation["controlId"]).toUpperCase() === wanted);
|
|
38957
39158
|
return toolResult({
|
|
@@ -38959,7 +39160,7 @@ function registerMaintenanceTools(server, client) {
|
|
|
38959
39160
|
...control.state === "no_evidence" ? { meaning: (control.coverage && plannedFor(control.coverage) === "later" ? `Planned later: the backlog deferred it (${String(control.coverage.deferredReason).replace(/\.$/, "")}). ` : "") + "Not assessed: no finding or violation is recorded against it, and the documents were not found to show it met. That is no evidence either way, not a pass." } : {},
|
|
38960
39161
|
...control.coverage ? { coverageNote: "coverage is how the backlog plans for it: the live initiatives that build it, or why it is deferred. It says what is planned, not that the control is met." } : {},
|
|
38961
39162
|
...control.assessment == null && (control.state === "breached" || control.state === "diverged") ? { assessmentNote: "No met or not-applicable verdict is shown: an open finding or violation against the control outranks one." } : {},
|
|
38962
|
-
...
|
|
39163
|
+
...(control.findingCount ?? 0) > 0 ? { findingsNote: `${String(control.findingCount)} open scanner finding${control.findingCount === 1 ? "" : "s"} breach it; taiga_list_findings (productId) lists them with the controls each breaches. violations below are the documents' only.` } : {},
|
|
38963
39164
|
violations: pickFields(own, VIOLATION_FIELDS),
|
|
38964
39165
|
...own.length > 0 ? wording : {}
|
|
38965
39166
|
});
|
|
@@ -39088,8 +39289,8 @@ function registerMaintenanceTools(server, client) {
|
|
|
39088
39289
|
const finding = (await client.getFinding(params.findingId)).data;
|
|
39089
39290
|
if (finding.productId !== params.productId) return toolError("NOT_FOUND", "No such finding in this product.");
|
|
39090
39291
|
return toolResult((await client.remediatePackage(params.productId, {
|
|
39091
|
-
ecosystem:
|
|
39092
|
-
packageName:
|
|
39292
|
+
ecosystem: finding.ecosystem,
|
|
39293
|
+
packageName: finding.packageName,
|
|
39093
39294
|
currentVersion: typeof finding.currentVersion === "string" ? finding.currentVersion : null,
|
|
39094
39295
|
productRepositoryId: typeof finding.productRepositoryId === "string" ? finding.productRepositoryId : null
|
|
39095
39296
|
})).data);
|
|
@@ -40015,7 +40216,7 @@ function failedLookup(what, reason) {
|
|
|
40015
40216
|
}
|
|
40016
40217
|
/** `a (v3), b (v1)` for a not-found message. */
|
|
40017
40218
|
function publishedList(rows) {
|
|
40018
|
-
return rows.filter((row) => row.isDraft
|
|
40219
|
+
return rows.filter((row) => !row.isDraft).map((row) => `${row.type} (v${String(row.version)})`).join(", ");
|
|
40019
40220
|
}
|
|
40020
40221
|
const DRAFT_WRITE$1 = {
|
|
40021
40222
|
readOnlyHint: false,
|
|
@@ -40246,7 +40447,7 @@ function registerDocumentTools(server, client) {
|
|
|
40246
40447
|
const doc = stripProvenance((await client.getTenantDocument(type)).data);
|
|
40247
40448
|
const read = args.sections ? sectionReadResult(doc, args.sections, type, { controlIds: POLICY_TYPES.includes(type) }) : toolResult(doc);
|
|
40248
40449
|
if (type !== DESIGN_STANDARDS) return read;
|
|
40249
|
-
const tokens = isRecord$1(doc.data) ? doc.data
|
|
40450
|
+
const tokens = isRecord$1(doc.data) ? doc.data.tokens : void 0;
|
|
40250
40451
|
const shown = (() => {
|
|
40251
40452
|
const first = read.content[0];
|
|
40252
40453
|
const parsed = first?.type === "text" ? JSON.parse(first.text) : {};
|
|
@@ -40529,10 +40730,10 @@ function failureCause(steps) {
|
|
|
40529
40730
|
return `step ${String(failed["stepOrder"])}: ${said}`;
|
|
40530
40731
|
}
|
|
40531
40732
|
function stoppedIn(run, steps) {
|
|
40532
|
-
if (run.prMerged
|
|
40733
|
+
if (run.prMerged || run.status !== "failed" && run.status !== "stopped") return null;
|
|
40533
40734
|
if (!steps.some((step) => step.status !== "planned")) return "before the first step started, while setting up the run (cloning, preparing the workspace)";
|
|
40534
40735
|
const open = steps.find((step) => step.status !== "completed" && step.status !== "skipped");
|
|
40535
|
-
if (open) return open.status === "planned" ? `before step ${String(open.stepOrder)}, ${
|
|
40736
|
+
if (open) return open.status === "planned" ? `before step ${String(open.stepOrder)}, ${open.title}, started (the ones before it completed)` : `step ${String(open.stepOrder)}, ${open.title} (${open.status})`;
|
|
40536
40737
|
if (run.hardeningResult == null) return "after the last step, in hardening: the security scanners and their fixes the agent runs before the pull request is ready. A retry continues from there; the steps stay.";
|
|
40537
40738
|
return "after the steps and hardening, at the pull request";
|
|
40538
40739
|
}
|
|
@@ -40706,7 +40907,8 @@ function hardeningSaid(blocking, named) {
|
|
|
40706
40907
|
if (named.length === 0) return `${count}; this run predates recording which.`;
|
|
40707
40908
|
const shown = named.slice(0, 3).map((finding) => {
|
|
40708
40909
|
const message = firstSentence(String(finding["message"]));
|
|
40709
|
-
const
|
|
40910
|
+
const line = finding["line"];
|
|
40911
|
+
const where = line && (typeof line === "number" || typeof line === "string") ? `${String(finding["path"])}:${line}` : String(finding["path"]);
|
|
40710
40912
|
return `${message} (${String(finding["tool"])}, ${where})`;
|
|
40711
40913
|
});
|
|
40712
40914
|
const rest = blocking - shown.length;
|
|
@@ -41325,7 +41527,7 @@ function waitingOn(rows, station) {
|
|
|
41325
41527
|
return station ? "Nothing holds the station: the first queued initiative is next to start." : "Nothing in the queue is running; the first queued initiative starts when no initiative is left in Plan or Build.";
|
|
41326
41528
|
}
|
|
41327
41529
|
const head = rows[at];
|
|
41328
|
-
const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${
|
|
41530
|
+
const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${head.backlogItemId}`;
|
|
41329
41531
|
if (head.entryState === "halted") {
|
|
41330
41532
|
const halt = head.halt;
|
|
41331
41533
|
const ahead = at > 0 ? " Entries ahead of it are not held by it." : "";
|
|
@@ -41337,8 +41539,8 @@ function waitingOn(rows, station) {
|
|
|
41337
41539
|
const pr = typeof head.prUrl === "string" ? ` (${head.prUrl})` : "";
|
|
41338
41540
|
if (lifecycle.cta === "start_build") return `${name} has its plan and waits for the Build slot; ${held}`;
|
|
41339
41541
|
if (head.handedBack) return `${name} was handed back to a person: ${head.handedBack}${pr}; ${held}`;
|
|
41340
|
-
if (lifecycle.turn === "you") return `${name} is waiting on a person (${
|
|
41341
|
-
return `${name} is ${
|
|
41542
|
+
if (lifecycle.turn === "you") return `${name} is waiting on a person (${lifecycle.cta ?? lifecycle.stage})${pr}; ${held}`;
|
|
41543
|
+
return `${name} is ${lifecycle.stage}${pr}; ${held}`;
|
|
41342
41544
|
}
|
|
41343
41545
|
const STATION_NAMED = 3;
|
|
41344
41546
|
/** Who holds the station, or null when the key cannot read the backlog or the read failed. */
|
|
@@ -41355,7 +41557,7 @@ async function stationHolders(client, product, except) {
|
|
|
41355
41557
|
return {
|
|
41356
41558
|
count: rows.length,
|
|
41357
41559
|
atLeast: capped,
|
|
41358
|
-
titles: rows.slice(0, STATION_NAMED).map((row) =>
|
|
41560
|
+
titles: rows.slice(0, STATION_NAMED).map((row) => row.title)
|
|
41359
41561
|
};
|
|
41360
41562
|
} catch (error) {
|
|
41361
41563
|
if (error instanceof TaigaApiError || isNetworkFailure(error)) return null;
|
|
@@ -41846,7 +42048,7 @@ function registerBacklogReads(server, client) {
|
|
|
41846
42048
|
if (column !== "open" || !["done", "canceled"].includes(String(row.state))) return true;
|
|
41847
42049
|
if (searchedText(row).some((value) => typeof value === "string" && searchable(value).includes(needle))) closedSeen += 1;
|
|
41848
42050
|
return false;
|
|
41849
|
-
}, (row) =>
|
|
42051
|
+
}, (row) => row.title);
|
|
41850
42052
|
const hidden = column === "open" && !found.more ? closedSeen : 0;
|
|
41851
42053
|
return toolResult({
|
|
41852
42054
|
...page(situatedRows(found.rows), null),
|
|
@@ -41874,7 +42076,7 @@ function registerBacklogReads(server, client) {
|
|
|
41874
42076
|
...failure
|
|
41875
42077
|
});
|
|
41876
42078
|
const summary = itemRows([item], ITEM_SUMMARY_FIELDS)[0];
|
|
41877
|
-
const description =
|
|
42079
|
+
const description = typeof summary["description"] === "string" ? summary["description"] : "";
|
|
41878
42080
|
return toolResult({
|
|
41879
42081
|
...withSituation(row, {
|
|
41880
42082
|
...summary,
|
|
@@ -42178,7 +42380,7 @@ function registerEdit(server, client) {
|
|
|
42178
42380
|
...links && linksChange ? { documentIds: links.send } : {}
|
|
42179
42381
|
})).data;
|
|
42180
42382
|
} catch (error) {
|
|
42181
|
-
if (links && error instanceof TaigaApiError && error.status === 400 &&
|
|
42383
|
+
if (links && error instanceof TaigaApiError && error.status === 400 && (error.apiMessage ?? "").includes("Referenced documents")) return toolError("VALIDATION_ERROR", `${error.apiMessage} Leave them out of documentIds to unlink them.`);
|
|
42182
42384
|
throw error;
|
|
42183
42385
|
}
|
|
42184
42386
|
const assigned = fields.assigneeId !== void 0 ? { assigneeId: fields.assigneeId } : {};
|
|
@@ -42646,7 +42848,7 @@ const SETTLED_RUN = new Set(BUILD_RUN_TERMINAL_STATUSES);
|
|
|
42646
42848
|
* state (null, just opened) counts as open.
|
|
42647
42849
|
*/
|
|
42648
42850
|
function prIsOpen(run) {
|
|
42649
|
-
return typeof run.prUrl === "string" && run.prUrl !== "" && run.prMerged
|
|
42851
|
+
return typeof run.prUrl === "string" && run.prUrl !== "" && !run.prMerged && run.prState !== "closed";
|
|
42650
42852
|
}
|
|
42651
42853
|
const ITEM_CONDITIONS = [
|
|
42652
42854
|
"changed",
|
|
@@ -42706,7 +42908,7 @@ function itemHolds(until, item, first, gate) {
|
|
|
42706
42908
|
case "planned": return item.planningStatus === "planned";
|
|
42707
42909
|
case "your_turn": return personTurn(item, gate) === "yes";
|
|
42708
42910
|
case "pr_open": return run !== null && prIsOpen(run);
|
|
42709
|
-
case "run_settled": return run !== null && SETTLED_RUN.has(
|
|
42911
|
+
case "run_settled": return run !== null && SETTLED_RUN.has(run.status);
|
|
42710
42912
|
case "done": return lifecycle.stage === "done";
|
|
42711
42913
|
}
|
|
42712
42914
|
}
|
|
@@ -42735,7 +42937,7 @@ function judgeItem(until, gate) {
|
|
|
42735
42937
|
const stage = lifecycleOf(item).stage;
|
|
42736
42938
|
if (stage === "canceled" || until !== "done" && stage === "done") return {
|
|
42737
42939
|
reached: false,
|
|
42738
|
-
stoppedBecause: `the initiative is ${
|
|
42940
|
+
stoppedBecause: `the initiative is ${stage}`
|
|
42739
42941
|
};
|
|
42740
42942
|
return null;
|
|
42741
42943
|
};
|
|
@@ -42799,10 +43001,10 @@ const runSignature = (run) => JSON.stringify([
|
|
|
42799
43001
|
]);
|
|
42800
43002
|
function judgeBuild(until) {
|
|
42801
43003
|
return (run, first) => {
|
|
42802
|
-
if (until === "changed" ? runSignature(run) !== runSignature(first) : until === "step_done" ?
|
|
42803
|
-
if (until !== "changed" && SETTLED_RUN.has(
|
|
43004
|
+
if (until === "changed" ? runSignature(run) !== runSignature(first) : until === "step_done" ? (run.completedSteps ?? 0) > (first.completedSteps ?? 0) : until === "pr_open" ? prIsOpen(run) : SETTLED_RUN.has(run.status)) return { reached: true };
|
|
43005
|
+
if (until !== "changed" && SETTLED_RUN.has(run.status)) return {
|
|
42804
43006
|
reached: false,
|
|
42805
|
-
stoppedBecause: `the run is ${
|
|
43007
|
+
stoppedBecause: `the run is ${run.status}`
|
|
42806
43008
|
};
|
|
42807
43009
|
if (until !== "changed" && run.status === "replanning" && run.failedReason === "steer_review") return {
|
|
42808
43010
|
reached: false,
|
|
@@ -42831,7 +43033,7 @@ function registerWaitTools(server, client, options) {
|
|
|
42831
43033
|
const gate = { product: void 0 };
|
|
42832
43034
|
const read = async (signal) => {
|
|
42833
43035
|
const item = (await client.getBacklogItem(target, signal)).data;
|
|
42834
|
-
if (gate.product === void 0 && typeof item.autoBuild !== "boolean") gate.product = client.hasCapability("products:read") ? await client.getProduct(
|
|
43036
|
+
if (gate.product === void 0 && typeof item.autoBuild !== "boolean") gate.product = client.hasCapability("products:read") ? await client.getProduct(item.productId, signal).then((p) => {
|
|
42835
43037
|
const value = p.data.autoBuild;
|
|
42836
43038
|
return typeof value === "boolean" ? value : true;
|
|
42837
43039
|
}).catch((error) => {
|
|
@@ -42864,7 +43066,7 @@ function registerWaitTools(server, client, options) {
|
|
|
42864
43066
|
});
|
|
42865
43067
|
};
|
|
42866
43068
|
const waitJob = async (target, params, ctx) => {
|
|
42867
|
-
const { now, deadline: _deadline, ...outcome } = await waitFor(async (signal) => (await client.getAgentJob(target, signal)).data, (job) => SETTLED_JOB_STATUSES.has(
|
|
43069
|
+
const { now, deadline: _deadline, ...outcome } = await waitFor(async (signal) => (await client.getAgentJob(target, signal)).data, (job) => SETTLED_JOB_STATUSES.has(job.status) ? { reached: true } : null, (params.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS$1) * 1e3, options, {
|
|
42868
43070
|
progressToken: ctx.mcpReq._meta?.progressToken,
|
|
42869
43071
|
notify: ctx.mcpReq.notify,
|
|
42870
43072
|
signal: ctx.mcpReq.signal
|
|
@@ -42933,13 +43135,13 @@ function judgeSync(job) {
|
|
|
42933
43135
|
reached: false,
|
|
42934
43136
|
stoppedBecause: NOT_A_SYNC
|
|
42935
43137
|
};
|
|
42936
|
-
return SETTLED_JOB_STATUSES.has(
|
|
43138
|
+
return SETTLED_JOB_STATUSES.has(job.status) ? { reached: true } : null;
|
|
42937
43139
|
}
|
|
42938
43140
|
/** A read that cannot take a signal, given up on when the signal fires; the read itself is left to finish unobserved. */
|
|
42939
43141
|
function within(read, signal) {
|
|
42940
43142
|
read.catch(() => void 0);
|
|
42941
43143
|
return new Promise((resolve, reject) => {
|
|
42942
|
-
|
|
43144
|
+
signal.throwIfAborted();
|
|
42943
43145
|
const onAbort = () => reject(signal.reason);
|
|
42944
43146
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
42945
43147
|
read.then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
|
|
@@ -43075,7 +43277,7 @@ function registerDesignTokenTools(server, client, wait) {
|
|
|
43075
43277
|
jobId: params.jobId,
|
|
43076
43278
|
note: STILL_WAITING
|
|
43077
43279
|
});
|
|
43078
|
-
if (!result.reached && result.stoppedBecause === NOT_A_SYNC) return toolError("VALIDATION_ERROR", `Job ${params.jobId} is not a design token sync (it is ${
|
|
43280
|
+
if (!result.reached && result.stoppedBecause === NOT_A_SYNC) return toolError("VALIDATION_ERROR", `Job ${params.jobId} is not a design token sync (it is ${job.type}). taiga_wait follows other jobs.`);
|
|
43079
43281
|
const report = jobReport(job);
|
|
43080
43282
|
if (job.status === "completed") {
|
|
43081
43283
|
const bound = AbortSignal.timeout(Math.max(result.deadline - Date.now(), 0));
|
|
@@ -43755,7 +43957,7 @@ async function productContext(client, product, options) {
|
|
|
43755
43957
|
let linksRead;
|
|
43756
43958
|
const links = () => linksRead ??= client.listProductRepositories(productId);
|
|
43757
43959
|
const fetchers = {
|
|
43758
|
-
factory: () => factoryPart(client,
|
|
43960
|
+
factory: () => factoryPart(client, product.factoryId),
|
|
43759
43961
|
documents: () => documentsPart(client, product, options.documents),
|
|
43760
43962
|
policies: () => policiesPart(client),
|
|
43761
43963
|
initiatives: () => backlogPart(client, productId),
|
|
@@ -43986,7 +44188,7 @@ function registerKnowledgeTools(server, client) {
|
|
|
43986
44188
|
});
|
|
43987
44189
|
return toolResult({
|
|
43988
44190
|
...pickFields([result.data], KNOWLEDGE_FIELDS)[0],
|
|
43989
|
-
deduplicated: result.deduplicated
|
|
44191
|
+
deduplicated: result.deduplicated
|
|
43990
44192
|
});
|
|
43991
44193
|
}));
|
|
43992
44194
|
server.registerTool("taiga_retry_knowledge", {
|
|
@@ -58768,7 +58970,7 @@ function renderDocument(doc) {
|
|
|
58768
58970
|
mimeType: "application/json",
|
|
58769
58971
|
text: JSON.stringify(doc, null, 2)
|
|
58770
58972
|
};
|
|
58771
|
-
const lines = [`# ${typeof doc.name === "string" ? doc.name :
|
|
58973
|
+
const lines = [`# ${typeof doc.name === "string" ? doc.name : typeof doc.type === "string" ? doc.type : "Document"}`];
|
|
58772
58974
|
const facts = [
|
|
58773
58975
|
"type",
|
|
58774
58976
|
"origin",
|
|
@@ -58978,17 +59180,17 @@ function registerPrompts(server, client) {
|
|
|
58978
59180
|
argsSchema: object({ initiativeId: idInput("initiative", "taiga_list_initiatives (query finds one by title) gives it") })
|
|
58979
59181
|
}, async (args) => {
|
|
58980
59182
|
const item = (await served$1(client.getBacklogItem(args.initiativeId), "No initiative with that ID the key can see; taiga_list_initiatives shows what exists")).data;
|
|
58981
|
-
const productId =
|
|
59183
|
+
const productId = item.productId;
|
|
58982
59184
|
const product = (await served$1(client.getProduct(productId), "The product of that item is not visible to the key")).data;
|
|
58983
59185
|
const origin = defaultOriginFor(product, "architecture");
|
|
58984
59186
|
const [architecture, instructions, policies] = await Promise.allSettled([
|
|
58985
59187
|
client.getProductDocument(productId, "architecture", origin),
|
|
58986
|
-
client.hasCapability("factories:read") ? client.getFactoryDocument(
|
|
59188
|
+
client.hasCapability("factories:read") ? client.getFactoryDocument(product.factoryId, "factory_instructions") : Promise.reject(new NotGranted("factories:read")),
|
|
58987
59189
|
client.hasCapability("tenant:documents:read") ? client.listTenantDocuments({ limit: 100 }) : Promise.reject(new NotGranted("tenant:documents:read"))
|
|
58988
59190
|
]);
|
|
58989
59191
|
const architectureText = architecture.status === "fulfilled" ? fence("markdown", renderDocument(stripProvenance(architecture.value.data)).text) : isNotFound(architecture.reason) ? `(No published ${origin} architecture; taiga_get_product_document without type shows what exists.)` : unreadable("The architecture", architecture.reason);
|
|
58990
59192
|
const instructionsText_ = instructions.status === "fulfilled" ? fence("markdown", instructionsText(sectionsOf(instructions.value.data.data) ?? {}) ?? "(The factory instructions are empty.)") : instructions.reason instanceof NotGranted ? instructions.reason.line("The factory instructions") : isNotFound(instructions.reason) ? "(This factory has not published instructions.)" : unreadable("The factory instructions", instructions.reason);
|
|
58991
|
-
const policiesText = policies.status === "fulfilled" ? fence("text", policies.value.data.filter((row) => POLICY_TYPES.includes(
|
|
59193
|
+
const policiesText = policies.status === "fulfilled" ? fence("text", policies.value.data.filter((row) => POLICY_TYPES.includes(row.type) && !row.isDraft).map((row) => `- ${row.type}: ${Object.keys(sectionsOf(row.data ?? {}) ?? {}).join(", ")}`).join("\n") || "(No policy is published.)") : policies.reason instanceof NotGranted ? policies.reason.line("The policies") : unreadable("The policies", policies.reason);
|
|
58992
59194
|
return message([
|
|
58993
59195
|
`Implement the following initiative of product ${productId} (named in the fenced initiative). Every acceptance`,
|
|
58994
59196
|
"criterion below must hold when you are done; say which ones you could not verify. Follow the factory",
|
|
@@ -59137,7 +59339,7 @@ function forgesOf(rows) {
|
|
|
59137
59339
|
})) };
|
|
59138
59340
|
}
|
|
59139
59341
|
function githubSource(client, installation) {
|
|
59140
|
-
const id =
|
|
59342
|
+
const id = installation.id;
|
|
59141
59343
|
return {
|
|
59142
59344
|
id,
|
|
59143
59345
|
row: githubAccount(installation),
|
|
@@ -59360,7 +59562,7 @@ function registerRepositoryTools(server, client) {
|
|
|
59360
59562
|
if (accounts.length === 0) return toolError("NOT_CONNECTED", "No GitHub, GitLab or Azure DevOps connection exists for this organization. A forge is connected once, in the web; then link.");
|
|
59361
59563
|
const login = params.account?.split("/")[0].toLowerCase();
|
|
59362
59564
|
const chosen = [
|
|
59363
|
-
...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login ||
|
|
59565
|
+
...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login || (i.accountLogin ?? "").toLowerCase() === login)).map((i) => githubSource(client, i)),
|
|
59364
59566
|
...gitlab.filter((c) => (!params.installationId || c.id === params.installationId) && (!params.account || connectionNames(c).includes(params.account.toLowerCase())) && (c.status !== "auth_failed" || Boolean(params.installationId || params.account))).map((c) => gitlabSource(client, c)),
|
|
59365
59567
|
...azure.filter((c) => (!params.installationId || c.id === params.installationId) && (!params.account || connectionNames(c).includes(params.account.toLowerCase())) && (c.status !== "auth_failed" || Boolean(params.installationId || params.account))).map((c) => azureSource(client, c))
|
|
59366
59568
|
];
|
|
@@ -59509,10 +59711,10 @@ async function served(read, miss) {
|
|
|
59509
59711
|
}
|
|
59510
59712
|
function registerResources(server, client) {
|
|
59511
59713
|
if (client.hasCapability("tenant:documents:read")) {
|
|
59512
|
-
const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => row.isDraft
|
|
59714
|
+
const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => !row.isDraft);
|
|
59513
59715
|
server.registerResource("organization-document", new ResourceTemplate("taiga://documents/{type}", { list: async () => ({ resources: (await published().catch(() => [])).map((row) => ({
|
|
59514
|
-
uri: `taiga://documents/${
|
|
59515
|
-
name:
|
|
59716
|
+
uri: `taiga://documents/${row.type}`,
|
|
59717
|
+
name: row.name ?? row.type,
|
|
59516
59718
|
description: typeof row.description === "string" ? row.description : void 0,
|
|
59517
59719
|
mimeType: mimeTypeOf(row)
|
|
59518
59720
|
})) }) }), {
|
|
@@ -59525,7 +59727,7 @@ function registerResources(server, client) {
|
|
|
59525
59727
|
} catch (error) {
|
|
59526
59728
|
if (!isMissOrRefusal(error)) throw error;
|
|
59527
59729
|
const rest = await published().then((rows) => {
|
|
59528
|
-
const names = rows.map((row) =>
|
|
59730
|
+
const names = rows.map((row) => row.type);
|
|
59529
59731
|
return names.length > 0 ? `Published documents: ${names.join(", ")}.` : "Nothing is published yet.";
|
|
59530
59732
|
}, (reason) => `The published list could not be read (${reason instanceof TaigaApiError ? apiFailureText(reason) : "the request failed"}).`);
|
|
59531
59733
|
return invalid(`No published ${type} the key can read (${apiFailureText(error)}). ${rest}`);
|
|
@@ -59856,12 +60058,15 @@ function registerSetupTools(server, client) {
|
|
|
59856
60058
|
}, (params) => runTool(async () => toolResult((await client.refreshRealityDocuments(params.productId, params.docTypes)).data)));
|
|
59857
60059
|
server.registerTool("taiga_finish_discovery", {
|
|
59858
60060
|
title: "Finish Discovery",
|
|
59859
|
-
description: "Finish a product's setup: lock its documents and start planning its first initiatives. Refused while documents are missing (the refusal lists them).",
|
|
59860
|
-
inputSchema: object({
|
|
60061
|
+
description: "Finish a product's setup: lock its documents and start planning its first initiatives. Refused while documents are missing (the refusal lists them). For an imported product, planFirstInitiatives false finishes without planning, as Not now does in the web.",
|
|
60062
|
+
inputSchema: object({
|
|
60063
|
+
productId,
|
|
60064
|
+
planFirstInitiatives: boolean().optional().describe("Imported product only: false finishes without planning its first initiatives (default true). A product set up from a conversation always plans; false is refused there.")
|
|
60065
|
+
}),
|
|
59861
60066
|
annotations: OPERATE
|
|
59862
60067
|
}, (params) => runTool(async () => {
|
|
59863
60068
|
try {
|
|
59864
|
-
return toolResult(await productRow(client, (await client.completeSetup(params.productId)).data));
|
|
60069
|
+
return toolResult(await productRow(client, (await client.completeSetup(params.productId, params.planFirstInitiatives === void 0 ? {} : { planFirstBacklog: params.planFirstInitiatives })).data));
|
|
59865
60070
|
} catch (error) {
|
|
59866
60071
|
if (!(error instanceof TaigaApiError) || error.details?.["reason"] !== "documents_incomplete") throw error;
|
|
59867
60072
|
return toolError(error.code ?? "CONFLICT", `${withStop(error.apiMessage ?? "Required documents are not published yet")} ${MISSING_DOCUMENTS_HOW}`, error.details);
|
|
@@ -60068,7 +60273,7 @@ function withRecoveryHints(tool, schema, inputs, isRead) {
|
|
|
60068
60273
|
};
|
|
60069
60274
|
const argument = issue.path?.length === 1 ? String(issue.path[0]) : void 0;
|
|
60070
60275
|
const source = argument ? idSource(argument) : void 0;
|
|
60071
|
-
if (source &&
|
|
60276
|
+
if (source && issue.message.includes("received undefined")) return {
|
|
60072
60277
|
...issue,
|
|
60073
60278
|
message: `required. ${source}`
|
|
60074
60279
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ai/mcp-server",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.1-dev.1237",
|
|
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",
|