@bicon/mcp-composer 0.3.6 → 0.5.0
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 +75 -13
- package/dist/index.mjs +671 -69
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ via API keys is a separate, security-reviewed phase.
|
|
|
24
24
|
| Name | What it does |
|
|
25
25
|
|---|---|
|
|
26
26
|
| resource `initiative://schema` / tool `get_initiative_schema` | The field catalog: required fields, enum values, the four dimensions with their named sub-dimensions (EN/DE labels + help text, plus the wording the app uses in digital / innovation portfolios), the exact shape of every optional section, the EU-AI-Act vocabularies, and the handoff steps. **Read this first.** |
|
|
27
|
-
| `assemble_initiative` | Compact spec (metadata + named sub-ratings 0–100 + confidence per dimension + optional sections, optionally the organisation's `context`) → fully-formed initiative validated against the API contract (`CreateInitiativeBody` from `@workspace/api-zod`). Mints the initiative id and every nested row id (decision-log entries, status reports, incidents — a client never invents ids), **derives** the four dimension scores (the app's own scoring function), accepts dates as dd/mm/yyyy, dd.mm.yyyy or yyyy-mm-dd, returns `{ok, initiative, derivedScores, warnings, errors, contextId}`. Pass `id` (an existing initiative's) only to **update** that initiative. |
|
|
27
|
+
| `assemble_initiative` | Compact spec (metadata + named sub-ratings 0–100 + confidence per dimension + optional sections, optionally the organisation's `context`) → fully-formed initiative validated against the API contract (`CreateInitiativeBody` from `@workspace/api-zod`). Mints the initiative id and every nested row id (decision-log entries, status reports, milestones, incidents — a client never invents ids), **derives** the four dimension scores (the app's own scoring function), accepts dates as dd/mm/yyyy, dd.mm.yyyy or yyyy-mm-dd, returns `{ok, initiative, derivedScores, warnings, errors, contextId}`. Pass `id` (an existing initiative's) only to **update** that initiative. |
|
|
28
28
|
| `export_initiative_file` | Takes the **same compact spec**, assembles it and wraps the result in the app's single-initiative JSON envelope; returns `{ok, filename, json, importInstructions, derivedScores, warnings}`. There is one pipeline — a hand-edited initiative object is not an input, so client-supplied scores or unknown keys can never bypass assembly. |
|
|
29
|
-
| `read_portfolio_context` | Takes the organisation's **portfolio-context file** (see below) and returns the interview plan for that organisation — its own labels, help texts and rating notes per sub-dimension, which sub-dimensions are switched off, its business units, categories, tags, skills (id + name)
|
|
29
|
+
| `read_portfolio_context` | Takes the organisation's **portfolio-context file** (see below) and returns the interview plan for that organisation — its own labels, help texts and rating notes per sub-dimension, which sub-dimensions are switched off, its business units, categories, tags, skills (id + name), non-archived initiatives (id + name) and the capability map's capabilities (id, name, domain, importance, current → target maturity; context version 2), currency, discount rate, whether the EU-AI-Act module is on — plus a short **contextId** that stands in for the file in the two other tools. |
|
|
30
30
|
| `composer_version` | Returns `{composerVersion, capabilities}`. Every *successful* tool result also carries `composerVersion`. |
|
|
31
31
|
|
|
32
32
|
### The portfolio context — how the Composer learns an organisation's settings
|
|
@@ -56,8 +56,11 @@ naming the fix, never a wrong answer. Effects:
|
|
|
56
56
|
- `businessUnit` and `aiCategory` **must be on the organisation's lists** (no
|
|
57
57
|
inventing — matched case-insensitively and normalised to the organisation's
|
|
58
58
|
spelling; new ones are created in the app's Settings); `dependsOn`,
|
|
59
|
-
`requiredSkills[].skillId` and an update
|
|
60
|
-
id format; Retired initiatives count,
|
|
59
|
+
`requiredSkills[].skillId`, `capabilityImpacts[].capabilityId` and an update
|
|
60
|
+
`id` must be ids that exist (any id format; Retired initiatives count,
|
|
61
|
+
archived ones do not; a capability, never a domain). A version-1 context
|
|
62
|
+
file (before 2026-10-15) carries no capabilities: links are refused with a
|
|
63
|
+
request to download the file again rather than guessed at;
|
|
61
64
|
- ratings must be on the organisation's **slider step** (Settings › Slider
|
|
62
65
|
granularity: 5, 10, 20 or 25) — the plan states it, a value off the grid is
|
|
63
66
|
rejected with the step in the message (files exported before 2026-08-21
|
|
@@ -90,7 +93,7 @@ vocabularies (`aiActVocabularies` in the descriptor; the app drops unknown
|
|
|
90
93
|
obligation keys and never shows unknown artifact keys), the score derivation —
|
|
91
94
|
is checked in the assembler, which reports **all** problems of a call at once
|
|
92
95
|
with the allowed values in the message (id shapes included). Row ids of
|
|
93
|
-
decision-log entries, status reports and incidents are minted by the
|
|
96
|
+
decision-log entries, status reports, milestones and incidents are minted by the
|
|
94
97
|
Composer — a client-supplied UUID is kept, anything else replaced — because
|
|
95
98
|
the app keys those rows per initiative and a re-used id from another
|
|
96
99
|
initiative is exactly what collided on import once.
|
|
@@ -228,21 +231,80 @@ card imports. Requires `python3` for the zip container.
|
|
|
228
231
|
|
|
229
232
|
## Publishing (maintainers)
|
|
230
233
|
|
|
231
|
-
Release = extension + npm together, from one version
|
|
234
|
+
Release = extension + npm together, from one version, done by two GitHub
|
|
235
|
+
Actions workflows (`docs/composer-release-ci-concept-2026-10-16.md`):
|
|
236
|
+
|
|
237
|
+
1. **Bump** — Actions → *Composer bump* → Run workflow on `dev` with
|
|
238
|
+
`patch | minor | major` (the button exists once `main` carries the workflow
|
|
239
|
+
file; GitHub lists only default-branch workflows). It runs
|
|
240
|
+
`npm version` (package.json is the ONLY place the version is written), the
|
|
241
|
+
package tests, `build:mcpb` (bundles, ship-gate smoke, writes the `.mcpb`
|
|
242
|
+
and `composer-extension.json` into the web app) and the app's
|
|
243
|
+
`composer-download.test.ts`, then pushes `composer/vX.Y.Z` with those three
|
|
244
|
+
files. Open its PR into `dev` yourself (the run summary links the compare
|
|
245
|
+
page); a PR opened by the Actions token would get no CI.
|
|
246
|
+
2. **Merge** the bump PR into `dev`, then release `dev → main` as usual.
|
|
247
|
+
3. **Publish** — on the push to `main`, *Composer publish* compares
|
|
248
|
+
package.json with the registry; when it is newer, it runs the package tests,
|
|
249
|
+
`check:mcpb` (rebuilds and proves the served download is the build of this
|
|
250
|
+
source), `npm publish` via npm trusted publishing (GitHub OIDC, no token in
|
|
251
|
+
the repo; provenance comes with it once the repository is public) and
|
|
252
|
+
`publish-smoke.mjs`, which fetches
|
|
253
|
+
`npx -y @bicon/mcp-composer@<version>` from the registry and requires
|
|
254
|
+
`initialize` and `composer_version` to answer with the new version.
|
|
255
|
+
|
|
256
|
+
One-time setting on npmjs.com (package → Settings → Trusted publisher):
|
|
257
|
+
GitHub Actions, repository `volkmarritter/ai-portfolio-steering-saas`,
|
|
258
|
+
workflow `composer-publish.yml`. If the form asks which actions the publisher
|
|
259
|
+
may take, allow direct `npm publish` (the workflow does not stage releases).
|
|
260
|
+
`package.json` names the same repository in `repository.url`, which npm
|
|
261
|
+
compares with the one the workflow runs in. A manual run of *Composer publish* is a
|
|
262
|
+
`--dry-run` unless the box is unticked, and a real publish runs only from
|
|
263
|
+
`main`.
|
|
264
|
+
|
|
265
|
+
`check:mcpb` compares the served download with a fresh build byte for byte,
|
|
266
|
+
so any change that alters the bundle after the last bump (Composer source, a
|
|
267
|
+
bump of the MCP SDK or zod in the lockfile) makes the publish fail until the
|
|
268
|
+
next *Composer bump* rebuilds the download. CI runs the same gate on every PR
|
|
269
|
+
into `main` (`npm view` against the registry, as the publish does): a version
|
|
270
|
+
ahead of the registry runs `check:mcpb`, so a release that bumps it shows a
|
|
271
|
+
stale download before the merge (run *Composer bump* once more, merge it into
|
|
272
|
+
`dev`, and the release PR goes green); a version behind the registry is red as
|
|
273
|
+
the publish would be; a version the registry already has skips the check, and a
|
|
274
|
+
PR that changes the served `.mcpb` or `composer-extension.json` at such a
|
|
275
|
+
version is red (npm cannot take that version again, so the download and the npm
|
|
276
|
+
package would differ): bump instead. So a green release PR means the publish on
|
|
277
|
+
`main` either skips or is the build of the source `main` carries.
|
|
278
|
+
|
|
279
|
+
When *Composer publish* is red on `main`, read the run: "behind" or a drift
|
|
280
|
+
failure mean bump again and release; "npm view failed" or "not a plain semver"
|
|
281
|
+
come from reading the registry, so re-run the failed job once the registry
|
|
282
|
+
answers (a bump does not help); a failed `npm publish` step itself (npm
|
|
283
|
+
outage, trusted publisher not yet configured on npmjs.com) is re-run from the
|
|
284
|
+
failed run ("Re-run failed jobs", same commit, the gate evaluates again) or by
|
|
285
|
+
dispatching *Composer publish* from `main` with `dry_run` unticked. Nothing
|
|
286
|
+
re-triggers it on its own, since later releases without a bump do not change
|
|
287
|
+
`package.json`. *Composer bump* runs from `dev` only. A run that fails with "branch composer/vX.Y.Z
|
|
288
|
+
already exists" met an earlier bump to the same version whose PR is still open
|
|
289
|
+
or was closed without merging: merge it, or delete that branch and run again.
|
|
290
|
+
|
|
291
|
+
Fallback by hand, if Actions is down:
|
|
232
292
|
|
|
233
293
|
```bash
|
|
234
294
|
cd lib/integrations/mcp
|
|
235
|
-
npm version patch|minor
|
|
236
|
-
pnpm run test
|
|
237
|
-
pnpm run build:mcpb
|
|
295
|
+
npm version patch|minor --no-git-tag-version
|
|
296
|
+
pnpm run test
|
|
297
|
+
pnpm run build:mcpb
|
|
238
298
|
npm login # once, as the BICon npm account (business identity, 2FA on)
|
|
239
299
|
npm publish # prepack builds; publishConfig.access is public
|
|
300
|
+
node publish-smoke.mjs <version> # fetches from the registry in an empty temp dir
|
|
240
301
|
```
|
|
241
302
|
|
|
242
|
-
Then commit
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
303
|
+
Then commit package.json, the `.mcpb` and `composer-extension.json` together.
|
|
304
|
+
When that version later reaches `main`, *Composer publish* sees it on the
|
|
305
|
+
registry and skips; a hand-published version higher than `main` carries makes
|
|
306
|
+
the workflow fail ("behind") until a bump at least as high lands.
|
|
307
|
+
The bundle inlines `zod`, `@workspace/api-zod` and
|
|
246
308
|
`@workspace/initiative-model` (workspace-only packages the registry cannot
|
|
247
309
|
resolve), so what ships is `dist/index.mjs` + this README with
|
|
248
310
|
`@modelcontextprotocol/sdk` as the sole runtime dependency —
|