@maka/maka-cli 5.143.0 → 5.143.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.143.
|
|
3
|
+
"version": "5.143.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 3.x applications using React.",
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import { Command } from '../../command.js';
|
|
4
|
+
import { UsageError } from '../../error.js';
|
|
3
5
|
export function registerBacklogMcp(parent) {
|
|
4
6
|
return Command.create({
|
|
5
7
|
name: 'mcp',
|
|
6
|
-
usage: 'maka play:backlog:mcp [--env <env>]',
|
|
7
|
-
|
|
8
|
+
usage: 'maka play:backlog:mcp [--env <env>] [--site <path>]',
|
|
9
|
+
// OFF, DELIBERATELY -- see the file header. The framework's own
|
|
10
|
+
// check fires before this handler runs at all and only knows how
|
|
11
|
+
// to look at process.cwd(); --site is this command's own way to
|
|
12
|
+
// satisfy the same requirement, so it needs the chance to try that
|
|
13
|
+
// first rather than being refused upstream of ever seeing it.
|
|
14
|
+
mustBeInMakaProject: false,
|
|
8
15
|
// NO maxArgLength HERE, DELIBERATELY. Command's own arg-length check
|
|
9
16
|
// is `args.length >= maxArgLength` (command.ts), so `maxArgLength: 0`
|
|
10
17
|
// refuses EVERY invocation regardless of what was typed -- an
|
|
@@ -17,29 +24,43 @@ export function registerBacklogMcp(parent) {
|
|
|
17
24
|
name: 'env',
|
|
18
25
|
description: 'Which maka-cli.com config/<env>/process.env supplies the Auth0 M2M credentials (default: production).',
|
|
19
26
|
},
|
|
27
|
+
{
|
|
28
|
+
name: 'site',
|
|
29
|
+
description: 'Path to a maka-cli.com checkout. Defaults to resolving one from the current working directory if omitted -- pass this explicitly when the launching MCP client does not set cwd reliably.',
|
|
30
|
+
},
|
|
20
31
|
],
|
|
21
32
|
shortDesc: 'Run an MCP server exposing game-backlog admin tools, authenticated as the M2M service account.',
|
|
22
33
|
description: `Starts a local MCP server (stdio transport) with tools for listing and reading
|
|
23
34
|
backlog items, attaching evidence and advancing status, drafting an AI bench, and posting
|
|
24
35
|
admin notes -- all against maka-cli.com's existing game-backlog REST API, authenticated as
|
|
25
36
|
the claude-agent@maka-cli.com service account via the Auth0 M2M token exchange
|
|
26
|
-
(api/v1/auth/m2m-login).
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
(api/v1/auth/m2m-login). Needs a maka-cli.com checkout to read AUTHZERO_DOMAIN /
|
|
38
|
+
AUTHZERO_CLIENT_ID / AUTHZERO_SECRET / AUTHZERO_AUDIENCE from config/<env>/process.env --
|
|
39
|
+
pass --site explicitly, or run with cwd already set to one.`,
|
|
29
40
|
examples: [
|
|
30
|
-
'maka play:backlog:mcp',
|
|
31
|
-
'maka play:backlog:mcp --env local',
|
|
41
|
+
'maka play:backlog:mcp --site C:\\path\\to\\maka-cli.com',
|
|
42
|
+
'maka play:backlog:mcp --env local --site C:\\path\\to\\maka-cli.com',
|
|
32
43
|
],
|
|
33
44
|
}, async function (_args, opts) {
|
|
34
45
|
const env = opts.env ?? 'production';
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
let processEnvPath;
|
|
47
|
+
if (opts.site) {
|
|
48
|
+
const siteConfigDir = path.join(path.resolve(opts.site), 'config', env);
|
|
49
|
+
processEnvPath = path.join(siteConfigDir, 'process.env');
|
|
50
|
+
if (!fs.existsSync(processEnvPath)) {
|
|
51
|
+
throw new UsageError(`No config/${env}/process.env under --site ${opts.site} (looked for ${processEnvPath}).`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
if (!this.cfg.checkConfigExists(env)) {
|
|
56
|
+
// Pre-handshake failure -- nothing has touched stdout as MCP
|
|
57
|
+
// protocol yet, so a plain thrown Error (which Command's own
|
|
58
|
+
// wrapper reports via Log.error) is fine here.
|
|
59
|
+
throw new UsageError(`Not in a maka-cli.com checkout and no --site given (looked for config/${env} under ${process.cwd()}).`);
|
|
60
|
+
}
|
|
61
|
+
const configPath = this.cfg.getAppConfigPath(env);
|
|
62
|
+
processEnvPath = path.join(configPath, 'process.env');
|
|
40
63
|
}
|
|
41
|
-
const configPath = this.cfg.getAppConfigPath(env);
|
|
42
|
-
const processEnvPath = path.join(configPath, 'process.env');
|
|
43
64
|
const [domain, clientId, clientSecret, audience] = await Promise.all([
|
|
44
65
|
this.dotenvx.get('AUTHZERO_DOMAIN', processEnvPath),
|
|
45
66
|
this.dotenvx.get('AUTHZERO_CLIENT_ID', processEnvPath),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.143.
|
|
3
|
+
"version": "5.143.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 3.x applications using React.",
|