@machinal/mcp 0.4.1 → 0.4.2
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 -8
- package/package.json +1 -1
- package/src/opencode-workflow.mjs +13 -1
package/README.md
CHANGED
|
@@ -12,19 +12,21 @@ Requires **Node.js 22.13+ (22.x) or 24+** and an installed agent client. **Machi
|
|
|
12
12
|
|
|
13
13
|
**Migration compatibility:** existing `dal_…` keys, `DIRECTION_API_KEY` / `DIRECTION_API_ORIGIN` environment variables, and the previous Windows Credential Manager entry continue to work. New setups use `mach_…`, `MACHINAL_API_KEY` / `MACHINAL_API_ORIGIN`, and `Machinal/mcp.MACHINAL_API_KEY`; when both environment names are set, `MACHINAL_API_KEY` takes precedence. New keys are issued with the `mach_` prefix.
|
|
14
14
|
|
|
15
|
-
**
|
|
15
|
+
**Version 0.4.2:** use the pinned commands below to install this release from the `@machinal` scope:
|
|
16
|
+
|
|
17
|
+
OpenCode compatibility: production startup accepts the V2 skill-list response (`{ location, data }`) and legacy arrays. If optional skill discovery fails or changes shape, it emits a sanitized warning instead of preventing session setup. Regression tests cover both response shapes and discovery failures; the release gate tests the packed artifact as well.
|
|
16
18
|
|
|
17
19
|
```sh
|
|
18
20
|
npx @machinal/mcp setup
|
|
19
21
|
# Machinal Server: no URL entry, only your Machinal key:
|
|
20
|
-
npx --yes @machinal/mcp@0.4.
|
|
21
|
-
npx --yes @machinal/mcp@0.4.
|
|
22
|
-
npx --yes @machinal/mcp@0.4.
|
|
22
|
+
npx --yes @machinal/mcp@0.4.2 setup --client opencode --mode server
|
|
23
|
+
npx --yes @machinal/mcp@0.4.2 setup --client codex --mode server
|
|
24
|
+
npx --yes @machinal/mcp@0.4.2 setup --client claude --scope global --mode server
|
|
23
25
|
# Independent local; the wizard asks for OpenRouter and model IDs:
|
|
24
|
-
npx --yes @machinal/mcp@0.4.
|
|
25
|
-
npx --yes @machinal/mcp@0.4.
|
|
26
|
+
npx --yes @machinal/mcp@0.4.2 setup --client codex --mode local --docker-dir /path/to/machinal
|
|
27
|
+
npx --yes @machinal/mcp@0.4.2 setup --client claude --mode local --docker-dir /path/to/machinal
|
|
26
28
|
# Your own deployment, explicitly selected:
|
|
27
|
-
npx --yes @machinal/mcp@0.4.
|
|
29
|
+
npx --yes @machinal/mcp@0.4.2 setup --client opencode --mode custom --url https://YOUR-API/mcp
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
The wizard asks for:
|
|
@@ -346,7 +348,7 @@ Test the npm executable/tarball path without publishing:
|
|
|
346
348
|
```sh
|
|
347
349
|
npm pack --dry-run
|
|
348
350
|
npm pack
|
|
349
|
-
npx --yes --package ./machinal-mcp-0.4.
|
|
351
|
+
npx --yes --package ./machinal-mcp-0.4.2.tgz machinal-mcp --help
|
|
350
352
|
```
|
|
351
353
|
|
|
352
354
|
The publish allowlist includes only selected `bin/*.mjs`, runtime/plugin source, portable skills, package metadata and this README. Package smoke tests reject project configs, nested agent installs, `.env`, media and old archives. No tests, local preferences or credentials are packaged.
|
package/package.json
CHANGED
|
@@ -3,6 +3,18 @@ const videoIntent = /\b(video|film|documentar\w*|cinematic\w*|montaj|reel|tiktok
|
|
|
3
3
|
const implementationIntent = /\b(renderer|plugin|bug|codul|code|test\w*|repar\w*|debug\w*|fix|refactor\w*)\b/iu;
|
|
4
4
|
const productionIntent = /\b(creează|creeaza|realizează|realizeaza|generează|genereaza|create|make|produce|render|randează|randeaza|editează|editeaza|edit)\b/iu;
|
|
5
5
|
|
|
6
|
+
async function availableProductionSkills(ctx) {
|
|
7
|
+
try {
|
|
8
|
+
const result = await ctx.skill.list();
|
|
9
|
+
const skills = Array.isArray(result) ? result : result?.data;
|
|
10
|
+
if (!Array.isArray(skills)) throw new TypeError('Unsupported skill list response');
|
|
11
|
+
return new Set(skills.filter(skill => typeof skill?.id === 'string').map(skill => skill.id));
|
|
12
|
+
} catch {
|
|
13
|
+
console.warn('[machinal] Automatic production skill discovery is unavailable; continuing without automatic skill attachment.');
|
|
14
|
+
return new Set();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
export async function installWorkflowStartup(ctx) {
|
|
7
19
|
if (ctx.skill?.transform) {
|
|
8
20
|
await ctx.skill.transform(editor => {
|
|
@@ -19,7 +31,7 @@ export async function installWorkflowStartup(ctx) {
|
|
|
19
31
|
const explicit = productionSkills.some(id => selected.has(id));
|
|
20
32
|
const text = (prompt.text ?? '').normalize('NFD').replace(/\p{M}/gu, '');
|
|
21
33
|
if (!explicit && !(videoIntent.test(text) && productionIntent.test(text) && !implementationIntent.test(text))) return;
|
|
22
|
-
const available =
|
|
34
|
+
const available = await availableProductionSkills(ctx);
|
|
23
35
|
for (const id of productionSkills) {
|
|
24
36
|
if (available.has(id) && !selected.has(id)) {
|
|
25
37
|
(prompt.skills ??= []).push({ id });
|