@taiga-ai/mcp-server 0.25.0-dev.473 → 0.25.0-dev.475

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 CHANGED
@@ -2256,6 +2256,11 @@ function emptyOriginNote(origin, product) {
2256
2256
  }
2257
2257
  }
2258
2258
  /**
2259
+ * What finishing does, in every next step that ends at it (PRO-2857): it
2260
+ * starts paid planning, so a client must ask the person before calling it.
2261
+ */
2262
+ const FINISH_DISCOVERY = "taiga_finish_discovery opens the product and starts planning its first initiatives (paid agent work: ask the person first).";
2263
+ /**
2259
2264
  * What a product in setup waits for, as the next call to make. Nothing on a
2260
2265
  * draft product says it otherwise: discoveryStep names the step and
2261
2266
  * importStatus the import, and the way on from each lives in tool
@@ -2266,17 +2271,17 @@ function setupNextStep(product) {
2266
2271
  if (product?.status !== "draft") return null;
2267
2272
  if (isImportedProduct(product)) switch (importStatusOf(product)) {
2268
2273
  case "analyzing":
2269
- case "generating_docs": return "The import is running and derives the documents from the code (taiga_wait_for_job follows its job). Then review them, and taiga_finish_discovery opens the product.";
2270
- case "complete": return "The import is done: review the reality documents (taiga_get_product_document without type), then taiga_finish_discovery opens the product.";
2274
+ case "generating_docs": return `The import is running and derives the documents from the code (taiga_wait_for_job follows its job). Then review them, and ${FINISH_DISCOVERY}`;
2275
+ case "complete": return "The import is done: review the reality documents (taiga_get_product_document without type), then taiga_finish_discovery opens the product and starts planning its first initiatives (paid agent work: ask the person first).";
2271
2276
  case "failed":
2272
2277
  case "cancelled": return "The last import did not finish: taiga_start_import runs it again.";
2273
2278
  default: return "Link its repository if it has none (taiga_list_linkable_repositories, taiga_link_repository), then taiga_start_import: the import derives the documents from the code and runs by itself.";
2274
2279
  }
2275
2280
  if (product.discoveryStep === void 0) return null;
2276
2281
  switch (product.discoveryStep) {
2277
- case "documents": return "The specification is done; the other documents are generated from it (taiga_generate_product_documents starts the ones still missing). Once every required one is published, taiga_finish_discovery opens the product.";
2278
- case "checks": return "The documents are published; the checks are stamped in the web, then taiga_finish_discovery opens the product.";
2279
- default: return "Discovery is a conversation held in the web: the person describes the product there and the specification comes out of it. The other documents follow, then taiga_finish_discovery opens the product.";
2282
+ case "documents": return `The specification is done; the other documents are generated from it (taiga_generate_product_documents starts the ones still missing). Once every required one is published, ${FINISH_DISCOVERY}`;
2283
+ case "checks": return `The documents are published; the checks are stamped in the web, then ${FINISH_DISCOVERY}`;
2284
+ default: return `Discovery is a conversation held in the web: the person describes the product there and the specification comes out of it. The other documents follow, then ${FINISH_DISCOVERY}`;
2280
2285
  }
2281
2286
  }
2282
2287
  /** What discoveryStep says, for a description that shows it. */
@@ -2823,7 +2828,7 @@ async function setupReadiness(client, product, links) {
2823
2828
  };
2824
2829
  }
2825
2830
  function nextStepFor(state) {
2826
- const finish = "taiga_finish_discovery opens the product and locks its documents (ask the person: it is their decision that the documents are right).";
2831
+ const finish = "taiga_finish_discovery opens the product, locks its documents and starts planning the first initiatives (paid agent work; ask the person: it is their decision that the documents are right).";
2827
2832
  if (state.imported) {
2828
2833
  if (state.linked === false) return "Link its repository (taiga_list_linkable_repositories, then taiga_link_repository), then taiga_start_import.";
2829
2834
  if (state.linked === null && state.importState === "not started") return setupNextStep(state.product);
@@ -21672,7 +21677,7 @@ function registerSetupTools(server, client) {
21672
21677
  }, (params) => runTool(async () => toolResult((await client.refreshRealityDocuments(params.productId, params.docTypes)).data)));
21673
21678
  server.registerTool("taiga_finish_discovery", {
21674
21679
  title: "Finish Discovery",
21675
- description: "Finish a product's Discovery: it locks the documents and opens the rest of the product; for an imported product the first initiatives are planned. Refused (CONFLICT) with details.reason: documents_incomplete (details.missingDocuments lists them and how they are made), not_in_setup (already finished), or a required check not yet stamped (stamped in the web). A locked document changes only after taiga_reopen_discovery. The person decides the documents are right: ask first.",
21680
+ description: "Finish a product's Discovery: it locks the documents, opens the rest of the product and starts planning the first initiatives (paid agent work; an imported product plans once its scan and policy assessment settle). Refused (CONFLICT) with details.reason: documents_incomplete (details.missingDocuments lists them and how they are made), not_in_setup (already finished), or a required check not yet stamped (stamped in the web). A locked document changes only after taiga_reopen_discovery. The person decides the documents are right: ask first.",
21676
21681
  inputSchema: z.object({ productId }),
21677
21682
  annotations: OPERATE
21678
21683
  }, (params) => runTool(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.25.0-dev.473",
3
+ "version": "0.25.0-dev.475",
4
4
  "description": "MCP server for Taiga -- gives AI assistants access to documents and products",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -161,6 +161,13 @@ export function emptyOriginNote(
161
161
  }
162
162
  }
163
163
 
164
+ /**
165
+ * What finishing does, in every next step that ends at it (PRO-2857): it
166
+ * starts paid planning, so a client must ask the person before calling it.
167
+ */
168
+ const FINISH_DISCOVERY =
169
+ 'taiga_finish_discovery opens the product and starts planning its first initiatives (paid agent work: ask the person first).';
170
+
164
171
  /**
165
172
  * What a product in setup waits for, as the next call to make. Nothing on a
166
173
  * draft product says it otherwise: discoveryStep names the step and
@@ -178,12 +185,12 @@ export function setupNextStep(
178
185
  case 'generating_docs':
179
186
  return (
180
187
  'The import is running and derives the documents from the code (taiga_wait_for_job follows its job). ' +
181
- 'Then review them, and taiga_finish_discovery opens the product.'
188
+ `Then review them, and ${FINISH_DISCOVERY}`
182
189
  );
183
190
  case 'complete':
184
191
  return (
185
192
  'The import is done: review the reality documents (taiga_get_product_document without type), then ' +
186
- 'taiga_finish_discovery opens the product.'
193
+ FINISH_DISCOVERY
187
194
  );
188
195
  case 'failed':
189
196
  case 'cancelled':
@@ -204,14 +211,14 @@ export function setupNextStep(
204
211
  return (
205
212
  'The specification is done; the other documents are generated from it ' +
206
213
  '(taiga_generate_product_documents starts the ones still missing). Once every required one is ' +
207
- 'published, taiga_finish_discovery opens the product.'
214
+ `published, ${FINISH_DISCOVERY}`
208
215
  );
209
216
  case 'checks':
210
- return 'The documents are published; the checks are stamped in the web, then taiga_finish_discovery opens the product.';
217
+ return `The documents are published; the checks are stamped in the web, then ${FINISH_DISCOVERY}`;
211
218
  default:
212
219
  return (
213
220
  'Discovery is a conversation held in the web: the person describes the product there and the ' +
214
- 'specification comes out of it. The other documents follow, then taiga_finish_discovery opens the product.'
221
+ `specification comes out of it. The other documents follow, then ${FINISH_DISCOVERY}`
215
222
  );
216
223
  }
217
224
  }
@@ -127,8 +127,8 @@ function nextStepFor(state: {
127
127
  product: Row;
128
128
  }): string | null {
129
129
  const finish =
130
- 'taiga_finish_discovery opens the product and locks its documents (ask the person: it is their decision ' +
131
- 'that the documents are right).';
130
+ 'taiga_finish_discovery opens the product, locks its documents and starts planning the first initiatives ' +
131
+ '(paid agent work; ask the person: it is their decision that the documents are right).';
132
132
  if (state.imported) {
133
133
  if (state.linked === false) {
134
134
  return 'Link its repository (taiga_list_linkable_repositories, then taiga_link_repository), then taiga_start_import.';
@@ -386,8 +386,9 @@ export function registerSetupTools(server: McpServer, client: TaigaClient) {
386
386
  {
387
387
  title: 'Finish Discovery',
388
388
  description:
389
- "Finish a product's Discovery: it locks the documents and opens the rest of the product; for an imported " +
390
- 'product the first initiatives are planned. Refused (CONFLICT) with details.reason: documents_incomplete ' +
389
+ "Finish a product's Discovery: it locks the documents, opens the rest of the product and starts planning " +
390
+ 'the first initiatives (paid agent work; an imported product plans once its scan and policy assessment ' +
391
+ 'settle). Refused (CONFLICT) with details.reason: documents_incomplete ' +
391
392
  '(details.missingDocuments lists them and how they are made), not_in_setup (already finished), or a ' +
392
393
  'required check not yet stamped (stamped in the web). A locked document changes only after ' +
393
394
  'taiga_reopen_discovery. The person decides the documents are right: ask first.',