@taiga-ai/mcp-server 0.2.3-dev.222 → 0.2.3-dev.225

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
@@ -4,22 +4,224 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
4
4
  import { z } from "zod";
5
5
  //#region ../../packages/feature-flags/dist/index.js
6
6
  /**
7
- * Resolve the full flag set for an environment. THE single place the
8
- * per-environment rules live. Frozen so a resolved set cannot be mutated at
9
- * runtime changing a flag is a source edit here, not an assignment in an app.
7
+ * Feature flags shared across web, api, mcp-server, and the documentation site.
8
+ *
9
+ * {@link featureFlagDefinitions} is the single source of truth for WHICH flags
10
+ * exist, HOW each one resolves per environment, and what it is for; the
11
+ * {@link FeatureFlags} type is derived from it. Every app calls
12
+ * {@link resolveFeatureFlags} with its own environment identifier so a feature
13
+ * is shown or hidden consistently everywhere from one rule set:
14
+ * - web: `resolveFeatureFlags(config.VITE_APP_ENV)` (baked at build time)
15
+ * - api: a fail-safe wrapper (`apps/api/src/shared/config/feature-flags.ts`)
16
+ * that resolves `ENVIRONMENT` and defaults to `prod` for any unrecognized
17
+ * value when deployed, so a WIP feature is never leaked
18
+ * - docs: `apps/docs/src/content.config.ts` resolves flags for the
19
+ * environment being built and DROPS pages carrying `flag: <name>` where
20
+ * that flag is off, so docs.tai.ga never describes a feature customers
21
+ * cannot see (PRO-1033)
22
+ *
23
+ * Flags are boot-time constants — no remote source. Changing a rule here
24
+ * re-derives the flag everywhere.
25
+ *
26
+ * ## Adding a flag
27
+ *
28
+ * One entry in {@link featureFlagDefinitions}: its `availability`, a one-line
29
+ * `description` for the web dev panel, and the full account of what it gates
30
+ * and why as the JSDoc above the entry. If the flag is OFF in prod, two more
31
+ * things follow, and the first will stop you:
32
+ *
33
+ * 1. **`make docs-check-claims` fails until the flag is registered** in
34
+ * `FLAG_PHRASES` (`apps/docs/scripts/check-claims.py`). That is deliberate:
35
+ * the check used to iterate its own dict, so an unregistered flag was never
36
+ * examined and a page could describe an invisible feature. Register the
37
+ * words a page would use for the feature, or `[]` if it has a page of its
38
+ * own that declares the flag.
39
+ * 2. **A page for the feature can be written now**, carrying `flag: <name>` in
40
+ * its frontmatter. It is published on dev and staging and excluded from
41
+ * prod, and it publishes by itself when the flag graduates — no docs change.
42
+ * See the `flag:` section in `apps/docs/AGENTS.md`, which also covers the
43
+ * one constraint: nothing published may link to a flagged page.
44
+ */
45
+ /**
46
+ * THE registry: one entry per flag. Adding a flag is adding an entry here;
47
+ * {@link FeatureFlags} and {@link resolveFeatureFlags} derive from it.
48
+ */
49
+ const featureFlagDefinitions = Object.freeze({
50
+ /**
51
+ * Skills feature. When `false` the feature is fully dormant:
52
+ * - web: nav groups, dashboard governance row, and skills routes are hidden
53
+ * - api: the `/v1/agent-skills*` endpoints are not registered
54
+ * - mcp: the skill tools, their instruction mentions, and the
55
+ * `getProjectContext` skills summary are omitted
56
+ * - agent runtime: no skills are injected into agent prompts
57
+ * - seeding: no default skills are created for new tenants/teams/projects
58
+ *
59
+ * Hidden for now (not needed in the product yet; may return later).
60
+ */
61
+ skills: {
62
+ description: "Agent skills: the skills routes and pages, the MCP skill tools, and skills injected into agent prompts. Hidden in every environment for now.",
63
+ availability: "nowhere"
64
+ },
65
+ /**
66
+ * Insights surface (Learn loop) — production feedback and customer signals
67
+ * feeding the next iteration.
68
+ *
69
+ * Release toggle: ON in local/dev/staging, OFF in prod. Surfaces the
70
+ * scaffold page in lower environments only while the feature is designed.
71
+ * **Remove this flag (and its gates) at GA.**
72
+ */
73
+ insights: {
74
+ description: "Insights section of the Learn loop: production feedback and customer signals feeding the next iteration.",
75
+ availability: "non-prod"
76
+ },
77
+ /**
78
+ * UI Sparring (PRO-630) — AI-generated UI concepts for the CUSTOMER's app,
79
+ * rendered client-side in a sandboxed iframe styled with the tenant's
80
+ * design_standards tokens. When `false` the feature is fully dormant:
81
+ * - web: the concept gallery, the Studio and the `/dev/ui-artifact-test`
82
+ * route are not registered
83
+ * - api: the `/v1/projects/:projectId/ui-artifacts/*` endpoints are not
84
+ * registered
85
+ *
86
+ * The flow surface moved out from under this flag in PRO-1029 — see
87
+ * {@link FeatureFlags.flowStudio}.
88
+ *
89
+ * Release toggle: ON in local/dev/staging, OFF in prod while the feature is
90
+ * built out (foundation slice → workshop → binding).
91
+ * **Remove this flag (and its gates) at GA.**
92
+ */
93
+ uiSparring: {
94
+ description: "UI Sparring: AI-generated UI concepts for the customer's application, the concept gallery and the UI Studio, with their API endpoints.",
95
+ availability: "non-prod"
96
+ },
97
+ /**
98
+ * User Flow Studio (PRO-1029) — the conversational surface for the
99
+ * `user_flow` document: talk the flows into shape, the ux-planning agent
100
+ * drafts and revises them, every agreed change lands in the document.
101
+ *
102
+ * Split out of {@link FeatureFlags.uiSparring} because working out user flows
103
+ * is Discovery work that stands on its own: it happens before anyone asks
104
+ * what a screen looks like, and it is useful to a customer who never opens
105
+ * the UI Studio. Sharing one flag meant flows could not ship without shipping
106
+ * concept generation and the sparring chat with them.
107
+ *
108
+ * Gates the web surface only — the route and the Edit control on the user
109
+ * flows document. The streaming endpoint (`POST
110
+ * /v1/conversations/:id/workshop-stream`) is deliberately NOT gated: it
111
+ * carries a conversation, the same as the spec-chat route beside it, and
112
+ * hiding a page is not a reason to make an authenticated, capability-checked
113
+ * endpoint conditional.
114
+ *
115
+ * Release toggle: ON in local/dev/staging, OFF in prod until the surface has
116
+ * proven itself there. **Remove this flag (and its gates) at GA.**
117
+ */
118
+ flowStudio: {
119
+ description: "User Flow Studio: the conversational surface where the ux-planning agent drafts and revises the user flows document.",
120
+ availability: "non-prod"
121
+ },
122
+ /**
123
+ * Customer-definable check-and-stamp checklists (PRO-946..948, design
124
+ * PRO-933). When `false` the feature is fully dormant:
125
+ * - api: the `/v1/checklist-*` endpoints are not registered
126
+ * - api: no checklist instances are created on project creation (PR 2/3)
127
+ * - web: no discovery-pipeline checklist step, no org-settings editor
128
+ *
129
+ * Release toggle: ON in local/dev/staging, OFF in prod while the three
130
+ * slices (schema/API → gate + project surface → template editor) land.
131
+ * **Remove this flag (and its gates) at GA.**
132
+ */
133
+ checklists: {
134
+ description: "Customer-defined check-and-stamp checklists: the discovery pipeline step, the organization settings editor and their API endpoints.",
135
+ availability: "non-prod"
136
+ },
137
+ /**
138
+ * Questionnaire filling (PRO-932) — a customer uploads their own requirement
139
+ * spreadsheet, Taiga answers what the project's evidence supports with
140
+ * `document@version` citations, a human attests, and the answers are written
141
+ * back into that same workbook. ASTORI's THL Liite 4 is the first named
142
+ * preset, not a modelled regulation.
143
+ *
144
+ * When `false` the feature is fully dormant:
145
+ * - api: the `/v1/questionnaires*` and `/v1/projects/:id/questionnaires`
146
+ * endpoints are not registered
147
+ *
148
+ * Release toggle: ON in local/dev/staging, OFF in prod while the slices
149
+ * (import → fill → attest + export) land.
150
+ * **Remove this flag (and its gates) at GA.**
151
+ */
152
+ questionnaires: {
153
+ description: "Questionnaire filling: answer an uploaded requirement spreadsheet from project evidence with citations, attest, and write the answers back.",
154
+ availability: "non-prod"
155
+ },
156
+ /**
157
+ * UI Studio Wizard (PRO-1030) — the guided three-choice route through the UI
158
+ * decisions, for the person finishing Discovery who does not want a
159
+ * workbench. When `false` the feature is fully dormant:
160
+ * - web: the `/ui-wizard` route is not registered, and Discovery's UI
161
+ * Studio card offers only the studio itself
162
+ *
163
+ * Split out of {@link FeatureFlags.uiSparring} rather than riding it, for the
164
+ * reason {@link FeatureFlags.flowStudio} was: the wizard and the studio are
165
+ * two front doors onto the same concepts, and they will not graduate on the
166
+ * same day. Everything the wizard reaches is gated on `uiSparring` server-side
167
+ * (the concept job's own assembler throws without it), so every gate on this
168
+ * flag ANDs the two — a wizard released alone would offer a button that 500s.
169
+ *
170
+ * Release toggle: ON in local/dev/staging, OFF in prod.
171
+ * **Remove this flag (and its gates) at GA.**
172
+ */
173
+ uiStudioWizard: {
174
+ description: "UI Studio Wizard: the guided three-choice route through the UI decisions. Only works when uiSparring is also on, including on the API.",
175
+ availability: "non-prod"
176
+ },
177
+ /**
178
+ * Design-system emitter (PRO-887): materialise an organisation's INTERNAL
179
+ * Design Standards into `src/styles/design-tokens.css` + `DESIGN.md` in the
180
+ * generated application at build bootstrap. Never active for a tenant with a
181
+ * linked design-system repository (that repo is the source of truth).
182
+ *
183
+ * Release toggle: ON in local/dev/staging, OFF in prod until the first
184
+ * internal-DS build has been verified end to end.
185
+ */
186
+ designEmitter: {
187
+ description: "Design-system emitter: writes an organization's internal design standards into design-tokens.css and DESIGN.md in the generated application at build bootstrap.",
188
+ availability: "non-prod"
189
+ },
190
+ /**
191
+ * Autonomous merge (project "Autonomous Merge") -- Taiga decides when an
192
+ * agent-authored pull request merges, under a customer-set autonomy policy,
193
+ * instead of parking every green PR at `needs_review` for a person.
194
+ *
195
+ * NOT the customer's switch, and the distinction is the whole reason this
196
+ * comment is long. THIS flag is a per-ENVIRONMENT constant answering "does
197
+ * the capability exist in this build at all". The customer's consent is a
198
+ * separate per-TENANT policy resolved across org -> team -> project ->
199
+ * initiative, where org defaults to off. Reading this flag as "the tenant
200
+ * enabled auto-merge" would merge into a repository whose owner never asked
201
+ * for it. One is the kill switch, the other is the consent; they are never
202
+ * interchangeable.
203
+ *
204
+ * Release toggle: ON in local/dev/staging, OFF in prod while the policy core,
205
+ * forge preflight, executor and safety net land.
206
+ * **Remove this flag (and its gates) at GA.**
207
+ */
208
+ autoMerge: {
209
+ description: "Autonomous merge: Taiga merges green agent-authored pull requests under the customer's autonomy policy. This is the capability kill switch, not the tenant's consent.",
210
+ availability: "everywhere"
211
+ }
212
+ });
213
+ /** Every flag name, in registry order. */
214
+ const featureFlagNames = Object.keys(featureFlagDefinitions);
215
+ /**
216
+ * Resolve the full flag set for an environment from the registry. Frozen so a
217
+ * resolved set cannot be mutated at runtime — changing a flag is a source edit
218
+ * in {@link featureFlagDefinitions}, not an assignment in an app.
10
219
  */
11
220
  function resolveFeatureFlags(env) {
12
- return Object.freeze({
13
- skills: false,
14
- insights: env !== "prod",
15
- uiSparring: env !== "prod",
16
- flowStudio: env !== "prod",
17
- checklists: env !== "prod",
18
- questionnaires: env !== "prod",
19
- uiStudioWizard: env !== "prod",
20
- designEmitter: env !== "prod",
21
- autoMerge: env !== "prod"
22
- });
221
+ const isOn = (availability) => availability === "everywhere" || availability === "non-prod" && env !== "prod";
222
+ const resolved = {};
223
+ for (const name of featureFlagNames) resolved[name] = isOn(featureFlagDefinitions[name].availability);
224
+ return Object.freeze(resolved);
23
225
  }
24
226
  /**
25
227
  * Safe-default snapshot, resolved as `prod`: every still-gated release toggle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.2.3-dev.222",
3
+ "version": "0.2.3-dev.225",
4
4
  "description": "MCP server for Taiga -- gives AI assistants access to documents, skills, and projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",