@armotusitio/mcp-kit 0.0.0-stage → 0.1.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/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/dist/errors.d.ts +16 -0
- package/dist/errors.js +27 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/manifest-cli.d.ts +2 -0
- package/dist/manifest-cli.js +38 -0
- package/dist/manifest.d.ts +19 -0
- package/dist/manifest.js +45 -0
- package/dist/paths.d.ts +7 -0
- package/dist/paths.js +36 -0
- package/dist/redact.d.ts +3 -0
- package/dist/redact.js +32 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +103 -0
- package/dist/tool.d.ts +61 -0
- package/dist/tool.js +57 -0
- package/package.json +62 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the package uses [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - Unreleased
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `defineTool` and `defineServer` enforce the common contract: tool names, strict object schemas, all four MCP annotations, timeouts and unique tool names.
|
|
10
|
+
- `createServer` and `serveStdio`:
|
|
11
|
+
- validated input and output;
|
|
12
|
+
- secret redaction of summaries, data and progress;
|
|
13
|
+
- limits of 4 KB per summary and 256 KB per data payload;
|
|
14
|
+
- timeout, cancellation and progress notifications;
|
|
15
|
+
- stable `EXT_*` errors that never leak stack traces or paths.
|
|
16
|
+
- `resolveInProject` keeps paths inside the project, including through symbolic links and junctions.
|
|
17
|
+
- `toolManifest`, `writeManifest`, `manifestDifferences` and the `armotusitio-mcp-manifest` CLI, with a `--check` mode for CI.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alejandro Daniel Di Stefano
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @armotusitio/mcp-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared kit for the MCP servers of the [ArmotuSitio](https://armotusitio.com.ar) extensions. Every extension of the ArmotuSitio family publishes its tools through this kit, so Lola (the ArmotuSitio IDE assistant), Claude Code, Codex, Copilot and any other MCP client can use them under one contract.
|
|
4
|
+
|
|
5
|
+
> Kit compartido de los servidores MCP de las extensiones de ArmotuSitio. Cada extensión publica sus herramientas con este kit para que Lola, Claude Code, Codex y cualquier cliente MCP las usen con un mismo contrato.
|
|
6
|
+
|
|
7
|
+
## What it gives you
|
|
8
|
+
|
|
9
|
+
- **One contract.** Tool names follow `<extension>_<verb>_<object>`. Input and output are strict JSON Schema objects. The four MCP annotations are mandatory, because the IDE derives permissions from them.
|
|
10
|
+
- **Safe paths.** `context.resolvePath()` keeps every path inside the project, including through symbolic links and junctions.
|
|
11
|
+
- **Secret redaction.** Summaries, data and progress messages are redacted with the same rules as the ArmotuSitio IDE.
|
|
12
|
+
- **Stable errors.** A `ToolError` carries an `EXT_<EXTENSION>_<CAUSE>` code. An unexpected failure never leaks a stack trace or an absolute path.
|
|
13
|
+
- **Limits.** Each tool has a timeout and the client can cancel it. The summary is capped at 4 KB and structured data at 256 KB. Progress notifications are supported.
|
|
14
|
+
- **A manifest you can trust.** `armotusitio-mcp-manifest` writes the static list of tools, and its `--check` mode fails CI when the manifest and the server disagree.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { defineServer, defineTool, serveStdio, ToolError } from '@armotusitio/mcp-kit';
|
|
20
|
+
|
|
21
|
+
const server = defineServer({
|
|
22
|
+
name: 'saturivo',
|
|
23
|
+
version: '1.1.0',
|
|
24
|
+
tools: [
|
|
25
|
+
defineTool({
|
|
26
|
+
name: 'saturivo_check_setup',
|
|
27
|
+
description: 'Checks that the local load-testing setup is ready, without sending load.',
|
|
28
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
29
|
+
inputSchema: { type: 'object', properties: {}, additionalProperties: false },
|
|
30
|
+
run: async (_input, context) => {
|
|
31
|
+
const ready = await checkSetup(context.root, context.signal); // your extension's own core
|
|
32
|
+
if (!ready.ok) { throw new ToolError('EXT_SATURIVO_NOT_READY', ready.reason); }
|
|
33
|
+
return { summary: 'Setup ready.', data: { tools: ready.tools } };
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export default server;
|
|
40
|
+
if (process.argv[2] === 'mcp') { await serveStdio(server); }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Declare the server in the extension's `package.json`, so the ArmotuSitio IDE finds it on its own:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
"armotusitio": {
|
|
47
|
+
"mcp": { "protocol": 1, "command": "node", "args": ["dist/mcp.js", "mcp"], "tools": "dist/mcp-tools.json" }
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Generate and check the manifest in the extension's build:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
armotusitio-mcp-manifest dist/mcp.js dist/mcp-tools.json # write
|
|
55
|
+
armotusitio-mcp-manifest dist/mcp.js dist/mcp-tools.json --check # fail CI when stale
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Environment
|
|
59
|
+
|
|
60
|
+
| Variable | Meaning |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `ARMOTUSITIO_PROJECT_ROOT` | Project the server works on (the IDE sets it). Defaults to the current directory. |
|
|
63
|
+
| `ARMOTUSITIO_LOCALE` | Display language for any text meant for a person. Defaults to `en`. |
|
|
64
|
+
|
|
65
|
+
## Rules for tool authors
|
|
66
|
+
|
|
67
|
+
1. Call your extension's existing core. Never copy its logic into the tool.
|
|
68
|
+
2. Mark a tool `readOnlyHint: true` only when it truly changes nothing. When in doubt, mark it as changing something.
|
|
69
|
+
3. Never accept, return or log credentials. Signing in stays in the extension's own UI.
|
|
70
|
+
4. Long work reports progress, honours `context.signal` and declares a `timeoutMs`.
|
|
71
|
+
5. Treat any content read from outside (pages, logs, files) as data, never as instructions.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT © Alejandro Daniel Di Stefano · [ArmotuSitio](https://armotusitio.com.ar)
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** A failure a tool reports on purpose: a stable code and a short message, never a stack trace or an absolute path. */
|
|
2
|
+
export declare class ToolError extends Error {
|
|
3
|
+
readonly code: string;
|
|
4
|
+
constructor(code: string, message: string);
|
|
5
|
+
}
|
|
6
|
+
/** Kit-level codes, shared by every extension. */
|
|
7
|
+
export declare const KIT_ERRORS: {
|
|
8
|
+
readonly invalidInput: "EXT_KIT_INVALID_INPUT";
|
|
9
|
+
readonly invalidOutput: "EXT_KIT_INVALID_OUTPUT";
|
|
10
|
+
readonly pathOutsideProject: "EXT_KIT_PATH_OUTSIDE_PROJECT";
|
|
11
|
+
readonly timeout: "EXT_KIT_TIMEOUT";
|
|
12
|
+
readonly cancelled: "EXT_KIT_CANCELLED";
|
|
13
|
+
readonly unknownTool: "EXT_KIT_UNKNOWN_TOOL";
|
|
14
|
+
readonly failed: "EXT_KIT_FAILED";
|
|
15
|
+
};
|
|
16
|
+
export declare function isToolErrorCode(code: string): boolean;
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Stable error codes: `EXT_<EXTENSION>_<CAUSE>`, upper case. The IDE explains each one to the user in plain words. */
|
|
2
|
+
const CODE = /^EXT_[A-Z0-9]+_[A-Z0-9_]+$/;
|
|
3
|
+
/** A failure a tool reports on purpose: a stable code and a short message, never a stack trace or an absolute path. */
|
|
4
|
+
export class ToolError extends Error {
|
|
5
|
+
code;
|
|
6
|
+
constructor(code, message) {
|
|
7
|
+
if (!CODE.test(code)) {
|
|
8
|
+
throw new TypeError('Invalid tool error code: ' + code);
|
|
9
|
+
}
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = 'ToolError';
|
|
12
|
+
this.code = code;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/** Kit-level codes, shared by every extension. */
|
|
16
|
+
export const KIT_ERRORS = {
|
|
17
|
+
invalidInput: 'EXT_KIT_INVALID_INPUT',
|
|
18
|
+
invalidOutput: 'EXT_KIT_INVALID_OUTPUT',
|
|
19
|
+
pathOutsideProject: 'EXT_KIT_PATH_OUTSIDE_PROJECT',
|
|
20
|
+
timeout: 'EXT_KIT_TIMEOUT',
|
|
21
|
+
cancelled: 'EXT_KIT_CANCELLED',
|
|
22
|
+
unknownTool: 'EXT_KIT_UNKNOWN_TOOL',
|
|
23
|
+
failed: 'EXT_KIT_FAILED'
|
|
24
|
+
};
|
|
25
|
+
export function isToolErrorCode(code) {
|
|
26
|
+
return CODE.test(code);
|
|
27
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { KIT_ERRORS, ToolError, isToolErrorCode } from './errors.ts';
|
|
2
|
+
export { manifestDifferences, PROTOCOL, toolManifest, writeManifest, type ToolManifest } from './manifest.ts';
|
|
3
|
+
export { projectRoot, resolveInProject } from './paths.ts';
|
|
4
|
+
export { redactDeep, redactSecrets } from './redact.ts';
|
|
5
|
+
export { createServer, MAX_DATA_BYTES, MAX_SUMMARY_BYTES, serveStdio, type ServeOptions } from './server.ts';
|
|
6
|
+
export { DEFAULT_TIMEOUT_MS, defineServer, defineTool, MAX_TIMEOUT_MS, type ObjectSchema, type ServerDefinition, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolResult } from './tool.ts';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { KIT_ERRORS, ToolError, isToolErrorCode } from "./errors.js";
|
|
2
|
+
export { manifestDifferences, PROTOCOL, toolManifest, writeManifest } from "./manifest.js";
|
|
3
|
+
export { projectRoot, resolveInProject } from "./paths.js";
|
|
4
|
+
export { redactDeep, redactSecrets } from "./redact.js";
|
|
5
|
+
export { createServer, MAX_DATA_BYTES, MAX_SUMMARY_BYTES, serveStdio } from "./server.js";
|
|
6
|
+
export { DEFAULT_TIMEOUT_MS, defineServer, defineTool, MAX_TIMEOUT_MS } from "./tool.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
3
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
4
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
5
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
return path;
|
|
9
|
+
};
|
|
10
|
+
/*
|
|
11
|
+
* armotusitio-mcp-manifest <server module> <manifest file> [--check]
|
|
12
|
+
* Writes the tool manifest of the server the module exports as default, or with --check fails when the file differs.
|
|
13
|
+
*/
|
|
14
|
+
import * as fs from 'node:fs/promises';
|
|
15
|
+
import * as path from 'node:path';
|
|
16
|
+
import { pathToFileURL } from 'node:url';
|
|
17
|
+
import { manifestDifferences, writeManifest } from "./manifest.js";
|
|
18
|
+
const [moduleFile, manifestFile, flag] = process.argv.slice(2);
|
|
19
|
+
if (!moduleFile || !manifestFile) {
|
|
20
|
+
process.stderr.write('Usage: armotusitio-mcp-manifest <server module> <manifest file> [--check]\n');
|
|
21
|
+
process.exit(2);
|
|
22
|
+
}
|
|
23
|
+
const loaded = await import(__rewriteRelativeImportExtension(pathToFileURL(path.resolve(moduleFile)).href));
|
|
24
|
+
if (!loaded.default) {
|
|
25
|
+
process.stderr.write('The module must export its server definition as default.\n');
|
|
26
|
+
process.exit(2);
|
|
27
|
+
}
|
|
28
|
+
if (flag === '--check') {
|
|
29
|
+
const written = JSON.parse(await fs.readFile(manifestFile, 'utf8'));
|
|
30
|
+
const differences = manifestDifferences(loaded.default, written);
|
|
31
|
+
if (differences.length) {
|
|
32
|
+
process.stderr.write('The tool manifest is out of date:\n ' + differences.join('\n ') + '\n');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
await writeManifest(loaded.default, manifestFile);
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { listedTool } from './server.ts';
|
|
2
|
+
import { type ServerDefinition } from './tool.ts';
|
|
3
|
+
/** Version of the contract between the IDE and an extension server; the IDE refuses versions it does not know. */
|
|
4
|
+
export declare const PROTOCOL = 1;
|
|
5
|
+
export interface ToolManifest {
|
|
6
|
+
protocol: number;
|
|
7
|
+
server: {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
};
|
|
11
|
+
tools: Array<ReturnType<typeof listedTool> & {
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
/** The static list of tools the IDE shows without starting the server, and checks the server against. */
|
|
16
|
+
export declare function toolManifest(definition: ServerDefinition): ToolManifest;
|
|
17
|
+
export declare function writeManifest(definition: ServerDefinition, file: string): Promise<void>;
|
|
18
|
+
/** Differences between a written manifest and the server, one line each; empty when they match exactly. */
|
|
19
|
+
export declare function manifestDifferences(definition: ServerDefinition, written: unknown): string[];
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import { listedTool } from "./server.js";
|
|
3
|
+
import { defineServer } from "./tool.js";
|
|
4
|
+
/** Version of the contract between the IDE and an extension server; the IDE refuses versions it does not know. */
|
|
5
|
+
export const PROTOCOL = 1;
|
|
6
|
+
/** The static list of tools the IDE shows without starting the server, and checks the server against. */
|
|
7
|
+
export function toolManifest(definition) {
|
|
8
|
+
defineServer(definition);
|
|
9
|
+
return {
|
|
10
|
+
protocol: PROTOCOL,
|
|
11
|
+
server: { name: definition.name, version: definition.version },
|
|
12
|
+
tools: definition.tools.map(tool => ({ ...listedTool(tool), ...(tool.timeoutMs !== undefined ? { timeoutMs: tool.timeoutMs } : {}) }))
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export async function writeManifest(definition, file) {
|
|
16
|
+
await fs.writeFile(file, JSON.stringify(toolManifest(definition), null, '\t') + '\n');
|
|
17
|
+
}
|
|
18
|
+
/** Differences between a written manifest and the server, one line each; empty when they match exactly. */
|
|
19
|
+
export function manifestDifferences(definition, written) {
|
|
20
|
+
const expected = toolManifest(definition);
|
|
21
|
+
const actual = written;
|
|
22
|
+
const differences = [];
|
|
23
|
+
if (actual?.protocol !== expected.protocol) {
|
|
24
|
+
differences.push('protocol: expected ' + expected.protocol + ', found ' + actual?.protocol);
|
|
25
|
+
}
|
|
26
|
+
if (JSON.stringify(actual?.server) !== JSON.stringify(expected.server)) {
|
|
27
|
+
differences.push('server: expected ' + JSON.stringify(expected.server));
|
|
28
|
+
}
|
|
29
|
+
const found = new Map((actual?.tools ?? []).map(tool => [tool.name, tool]));
|
|
30
|
+
for (const tool of expected.tools) {
|
|
31
|
+
const other = found.get(tool.name);
|
|
32
|
+
if (!other) {
|
|
33
|
+
differences.push('missing tool: ' + tool.name);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (JSON.stringify(other) !== JSON.stringify(tool)) {
|
|
37
|
+
differences.push('changed tool: ' + tool.name);
|
|
38
|
+
}
|
|
39
|
+
found.delete(tool.name);
|
|
40
|
+
}
|
|
41
|
+
for (const name of found.keys()) {
|
|
42
|
+
differences.push('undeclared tool: ' + name);
|
|
43
|
+
}
|
|
44
|
+
return differences;
|
|
45
|
+
}
|
package/dist/paths.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The project a server works on: `ARMOTUSITIO_PROJECT_ROOT` from the IDE, or the process directory. Always canonical. */
|
|
2
|
+
export declare function projectRoot(env?: NodeJS.ProcessEnv): Promise<string>;
|
|
3
|
+
/**
|
|
4
|
+
* A project-relative path resolved inside the project. Absolute paths, `..` that leaves the project and links that
|
|
5
|
+
* point outside it are refused. A path that does not exist yet is checked through its nearest existing parent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveInProject(root: string, relative: string): Promise<string>;
|
package/dist/paths.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { KIT_ERRORS, ToolError } from "./errors.js";
|
|
4
|
+
/** The project a server works on: `ARMOTUSITIO_PROJECT_ROOT` from the IDE, or the process directory. Always canonical. */
|
|
5
|
+
export async function projectRoot(env = process.env) {
|
|
6
|
+
return fs.realpath(env['ARMOTUSITIO_PROJECT_ROOT'] || process.cwd());
|
|
7
|
+
}
|
|
8
|
+
const inside = (root, candidate) => candidate === root || candidate.startsWith(root + path.sep);
|
|
9
|
+
/**
|
|
10
|
+
* A project-relative path resolved inside the project. Absolute paths, `..` that leaves the project and links that
|
|
11
|
+
* point outside it are refused. A path that does not exist yet is checked through its nearest existing parent.
|
|
12
|
+
*/
|
|
13
|
+
export async function resolveInProject(root, relative) {
|
|
14
|
+
if (typeof relative !== 'string' || relative.includes('\0') || path.isAbsolute(relative) || /^[a-zA-Z]:/.test(relative)) {
|
|
15
|
+
throw new ToolError(KIT_ERRORS.pathOutsideProject, 'Use a path relative to the project.');
|
|
16
|
+
}
|
|
17
|
+
const target = path.resolve(root, relative);
|
|
18
|
+
if (!inside(root, target)) {
|
|
19
|
+
throw new ToolError(KIT_ERRORS.pathOutsideProject, 'The path leaves the project.');
|
|
20
|
+
}
|
|
21
|
+
let existing = target;
|
|
22
|
+
for (;;) {
|
|
23
|
+
const real = await fs.realpath(existing).catch(() => undefined);
|
|
24
|
+
if (real) {
|
|
25
|
+
if (!inside(root, real)) {
|
|
26
|
+
throw new ToolError(KIT_ERRORS.pathOutsideProject, 'The path points outside the project.');
|
|
27
|
+
}
|
|
28
|
+
return existing === target ? real : path.join(real, path.relative(existing, target));
|
|
29
|
+
}
|
|
30
|
+
const parent = path.dirname(existing);
|
|
31
|
+
if (parent === existing) {
|
|
32
|
+
throw new ToolError(KIT_ERRORS.pathOutsideProject, 'The path leaves the project.');
|
|
33
|
+
}
|
|
34
|
+
existing = parent;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/dist/redact.d.ts
ADDED
package/dist/redact.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Secret redaction for everything a tool returns or logs. The rules mirror the ArmotuSitio IDE redactor
|
|
3
|
+
* (`extensions/armotusitio-ide/src/native-redact.ts`); a change there is made here in the same release.
|
|
4
|
+
*/
|
|
5
|
+
const ANSI = /\x1b(?:\[[0-?]*[ -/]*[@-~]|\](?:[^\x07\x1b]|\x1b(?!\\))*(?:\x07|\x1b\\))/g;
|
|
6
|
+
const BEARER = /\b(Bearer\s+)[^\s"']+/gi;
|
|
7
|
+
/** `key=value`, `key: value` and JSON `"key": "value"`; a quoted value stays quoted so JSON remains valid. */
|
|
8
|
+
const ASSIGNMENT = /(["']?(?:token|secret|password|api[_-]?key|access[_-]?key|private[_-]?key|connection[_-]?token)["']?\s*[=:]\s*)("(?:\\.|[^"\\])*(?:"|$)|'[^']*(?:'|$)|[^\s,"'}]+)/gi;
|
|
9
|
+
/** Well-known credential shapes that appear without a key name. */
|
|
10
|
+
const TOKEN_SHAPES = /\b(?:sk-[A-Za-z0-9_-]{16,}|github_pat_[A-Za-z0-9_]{16,}|gh[pousr]_[A-Za-z0-9]{30,}|xox[abprs]-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16}|glpat-[A-Za-z0-9_-]{20,}|AIza[0-9A-Za-z_-]{35}|[sr]k_live_[A-Za-z0-9]{16,})\b/g;
|
|
11
|
+
/** A password inside a URL's user-info part: it goes, the rest of the address stays readable. */
|
|
12
|
+
const URL_CREDENTIALS = /(\b[a-z][a-z0-9+.-]*:\/\/[^\s:/@]*:)[^\s@/]+(?=@)/gi;
|
|
13
|
+
/** A whole PEM private key block, even when it was cut off before its END line. */
|
|
14
|
+
const PRIVATE_KEY_BLOCK = /-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g;
|
|
15
|
+
export function redactSecrets(value) {
|
|
16
|
+
return String(value).replace(ANSI, '').replace(BEARER, '$1[redacted]')
|
|
17
|
+
.replace(ASSIGNMENT, (_match, prefix, secret) => prefix + (secret.startsWith('"') ? '"[redacted]"' : '[redacted]'))
|
|
18
|
+
.replace(TOKEN_SHAPES, '[redacted]').replace(URL_CREDENTIALS, '$1[redacted]').replace(PRIVATE_KEY_BLOCK, '[redacted private key]');
|
|
19
|
+
}
|
|
20
|
+
/** Redacts every string inside a JSON-like value, keeping its shape. */
|
|
21
|
+
export function redactDeep(value) {
|
|
22
|
+
if (typeof value === 'string') {
|
|
23
|
+
return redactSecrets(value);
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(value)) {
|
|
26
|
+
return value.map(item => redactDeep(item));
|
|
27
|
+
}
|
|
28
|
+
if (value && typeof value === 'object') {
|
|
29
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, redactDeep(item)]));
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { type ServerDefinition, type ToolDefinition } from './tool.ts';
|
|
3
|
+
/** Bytes of summary text the model receives; the rest is cut with a visible marker. */
|
|
4
|
+
export declare const MAX_SUMMARY_BYTES = 4096;
|
|
5
|
+
/** Bytes of structured data one call may return. */
|
|
6
|
+
export declare const MAX_DATA_BYTES: number;
|
|
7
|
+
export interface ServeOptions {
|
|
8
|
+
env?: NodeJS.ProcessEnv;
|
|
9
|
+
}
|
|
10
|
+
/** The MCP `tools/list` entry of a tool: exactly what the manifest records. */
|
|
11
|
+
export declare function listedTool(tool: ToolDefinition<never, never>): {
|
|
12
|
+
annotations: import("./tool.ts").ToolAnnotations;
|
|
13
|
+
outputSchema?: import("./tool.ts").ObjectSchema;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
inputSchema: import("./tool.ts").ObjectSchema;
|
|
17
|
+
};
|
|
18
|
+
/** Builds the MCP server of an extension: validated input and output, redaction, limits, timeout, cancellation and progress. */
|
|
19
|
+
export declare function createServer(definition: ServerDefinition, options?: ServeOptions): Server;
|
|
20
|
+
/** Serves an extension's tools over stdio; this is the entry point the IDE and the terminal clients start. */
|
|
21
|
+
export declare function serveStdio(definition: ServerDefinition, options?: ServeOptions): Promise<Server>;
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Ajv } from 'ajv';
|
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { KIT_ERRORS, ToolError } from "./errors.js";
|
|
6
|
+
import { projectRoot, resolveInProject } from "./paths.js";
|
|
7
|
+
import { redactDeep, redactSecrets } from "./redact.js";
|
|
8
|
+
import { DEFAULT_TIMEOUT_MS, defineServer } from "./tool.js";
|
|
9
|
+
/** Bytes of summary text the model receives; the rest is cut with a visible marker. */
|
|
10
|
+
export const MAX_SUMMARY_BYTES = 4096;
|
|
11
|
+
/** Bytes of structured data one call may return. */
|
|
12
|
+
export const MAX_DATA_BYTES = 256 * 1024;
|
|
13
|
+
function bounded(text) {
|
|
14
|
+
const clean = redactSecrets(text);
|
|
15
|
+
if (Buffer.byteLength(clean) <= MAX_SUMMARY_BYTES) {
|
|
16
|
+
return clean;
|
|
17
|
+
}
|
|
18
|
+
return Buffer.from(clean).subarray(0, MAX_SUMMARY_BYTES - 32).toString('utf8').replace(/�$/, '') + '\n[...output cut]';
|
|
19
|
+
}
|
|
20
|
+
function failure(code, message) {
|
|
21
|
+
return { isError: true, content: [{ type: 'text', text: code + ': ' + bounded(message) }], structuredContent: { error: { code, message: bounded(message) } } };
|
|
22
|
+
}
|
|
23
|
+
/** The MCP `tools/list` entry of a tool: exactly what the manifest records. */
|
|
24
|
+
export function listedTool(tool) {
|
|
25
|
+
return { name: tool.name, description: tool.description, inputSchema: tool.inputSchema, ...(tool.outputSchema ? { outputSchema: tool.outputSchema } : {}), annotations: tool.annotations };
|
|
26
|
+
}
|
|
27
|
+
/** Builds the MCP server of an extension: validated input and output, redaction, limits, timeout, cancellation and progress. */
|
|
28
|
+
export function createServer(definition, options = {}) {
|
|
29
|
+
defineServer(definition);
|
|
30
|
+
const env = options.env ?? process.env;
|
|
31
|
+
const ajv = new Ajv({ strict: true, allErrors: false });
|
|
32
|
+
const validators = new Map();
|
|
33
|
+
for (const tool of definition.tools) {
|
|
34
|
+
validators.set(tool.name, { input: ajv.compile(tool.inputSchema), ...(tool.outputSchema ? { output: ajv.compile(tool.outputSchema) } : {}) });
|
|
35
|
+
}
|
|
36
|
+
const server = new Server({ name: 'armotusitio-' + definition.name, version: definition.version }, { capabilities: { tools: {} } });
|
|
37
|
+
let root;
|
|
38
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: definition.tools.map(listedTool) }));
|
|
39
|
+
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
40
|
+
const tool = definition.tools.find(item => item.name === request.params.name);
|
|
41
|
+
const checks = tool && validators.get(tool.name);
|
|
42
|
+
if (!tool || !checks) {
|
|
43
|
+
return failure(KIT_ERRORS.unknownTool, 'No tool named ' + request.params.name + '.');
|
|
44
|
+
}
|
|
45
|
+
const input = request.params.arguments ?? {};
|
|
46
|
+
if (!checks.input(input)) {
|
|
47
|
+
return failure(KIT_ERRORS.invalidInput, ajv.errorsText(checks.input.errors));
|
|
48
|
+
}
|
|
49
|
+
const timeout = AbortSignal.timeout(tool.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
50
|
+
const signal = AbortSignal.any([extra.signal, timeout]);
|
|
51
|
+
const token = request.params._meta?.progressToken;
|
|
52
|
+
try {
|
|
53
|
+
const projectDirectory = await (root ??= projectRoot(env));
|
|
54
|
+
const running = tool.run(input, {
|
|
55
|
+
root: projectDirectory, signal, locale: env['ARMOTUSITIO_LOCALE'] || 'en',
|
|
56
|
+
resolvePath: relative => resolveInProject(projectDirectory, relative),
|
|
57
|
+
progress: async (done, total, message) => {
|
|
58
|
+
if (token === undefined) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await extra.sendNotification({ method: 'notifications/progress', params: { progressToken: token, progress: done, ...(total !== undefined ? { total } : {}), ...(message ? { message: redactSecrets(message) } : {}) } });
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
// A tool that ignores the signal still cannot hold the call past its limit.
|
|
65
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
66
|
+
const stop = () => reject(new ToolError(timeout.aborted ? KIT_ERRORS.timeout : KIT_ERRORS.cancelled, timeout.aborted ? 'The tool reached its time limit.' : 'The call was cancelled.'));
|
|
67
|
+
if (signal.aborted) {
|
|
68
|
+
stop();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
signal.addEventListener('abort', stop, { once: true });
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
running.catch(() => undefined);
|
|
75
|
+
const result = await Promise.race([running, aborted]);
|
|
76
|
+
const data = result.data === undefined ? undefined : redactDeep(result.data);
|
|
77
|
+
if (checks.output && data !== undefined && !checks.output(data)) {
|
|
78
|
+
return failure(KIT_ERRORS.invalidOutput, 'The tool returned data outside its declared shape.');
|
|
79
|
+
}
|
|
80
|
+
if (data !== undefined && Buffer.byteLength(JSON.stringify(data)) > MAX_DATA_BYTES) {
|
|
81
|
+
return failure(KIT_ERRORS.invalidOutput, 'The tool returned more data than allowed; write a report instead.');
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
content: [{ type: 'text', text: bounded(result.summary + (result.report ? '\nReport: ' + result.report : '')) }],
|
|
85
|
+
...(data !== undefined ? { structuredContent: { ...data, ...(result.report ? { report: result.report } : {}) } } : {})
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
if (error instanceof ToolError) {
|
|
90
|
+
return failure(error.code, error.message);
|
|
91
|
+
}
|
|
92
|
+
// Unexpected failures never leak a stack trace or an absolute path to the model.
|
|
93
|
+
return failure(KIT_ERRORS.failed, 'The tool failed unexpectedly.');
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return server;
|
|
97
|
+
}
|
|
98
|
+
/** Serves an extension's tools over stdio; this is the entry point the IDE and the terminal clients start. */
|
|
99
|
+
export async function serveStdio(definition, options = {}) {
|
|
100
|
+
const server = createServer(definition, options);
|
|
101
|
+
await server.connect(new StdioServerTransport());
|
|
102
|
+
return server;
|
|
103
|
+
}
|
package/dist/tool.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** JSON Schema of an object: tools take and return objects, with no properties beyond the declared ones. */
|
|
2
|
+
export interface ObjectSchema {
|
|
3
|
+
type: 'object';
|
|
4
|
+
properties: Record<string, unknown>;
|
|
5
|
+
required?: string[];
|
|
6
|
+
additionalProperties: false;
|
|
7
|
+
[keyword: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
/** Every tool says what it touches; the IDE decides permissions from these, so none may be left out. */
|
|
10
|
+
export interface ToolAnnotations {
|
|
11
|
+
/** Only reads: runs without asking. */
|
|
12
|
+
readOnlyHint: boolean;
|
|
13
|
+
/** Deletes or overwrites something that cannot be recovered from the project. */
|
|
14
|
+
destructiveHint: boolean;
|
|
15
|
+
/** Calling it twice with the same input has the same effect as once. */
|
|
16
|
+
idempotentHint: boolean;
|
|
17
|
+
/** Reaches outside the computer (a server, a device, a cloud service). */
|
|
18
|
+
openWorldHint: boolean;
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
/** What a running tool can use: the project, cancellation, progress and paths kept inside the project. */
|
|
22
|
+
export interface ToolContext {
|
|
23
|
+
readonly root: string;
|
|
24
|
+
readonly signal: AbortSignal;
|
|
25
|
+
/** IDE display language (`es`, `en`, `pt-br`...), for any text meant for the person. */
|
|
26
|
+
readonly locale: string;
|
|
27
|
+
progress(done: number, total?: number, message?: string): Promise<void>;
|
|
28
|
+
resolvePath(relative: string): Promise<string>;
|
|
29
|
+
}
|
|
30
|
+
export interface ToolResult<Output = Record<string, unknown>> {
|
|
31
|
+
/** Short text for the model, at most 4 KB once redacted; longer text is cut with a visible marker. */
|
|
32
|
+
summary: string;
|
|
33
|
+
/** Structured result, validated against `outputSchema` when the tool declares one. */
|
|
34
|
+
data?: Output;
|
|
35
|
+
/** Project-relative path of a full report the tool wrote, when there is one. */
|
|
36
|
+
report?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ToolDefinition<Input = Record<string, unknown>, Output = Record<string, unknown>> {
|
|
39
|
+
/** `<extension>_<verb>_<object>`, snake_case, starting with the server name. */
|
|
40
|
+
name: string;
|
|
41
|
+
/** One sentence in English: what it does and what it returns. */
|
|
42
|
+
description: string;
|
|
43
|
+
inputSchema: ObjectSchema;
|
|
44
|
+
outputSchema?: ObjectSchema;
|
|
45
|
+
annotations: ToolAnnotations;
|
|
46
|
+
/** Upper bound for one call; the call is cancelled when it is reached. Default 120 s, at most 30 min. */
|
|
47
|
+
timeoutMs?: number;
|
|
48
|
+
run(input: Input, context: ToolContext): Promise<ToolResult<Output>>;
|
|
49
|
+
}
|
|
50
|
+
export interface ServerDefinition {
|
|
51
|
+
/** The extension's short name, lower case (`probato`, `saturivo`); every tool name starts with it. */
|
|
52
|
+
name: string;
|
|
53
|
+
version: string;
|
|
54
|
+
tools: readonly ToolDefinition<never, never>[];
|
|
55
|
+
}
|
|
56
|
+
export declare const DEFAULT_TIMEOUT_MS = 120000;
|
|
57
|
+
export declare const MAX_TIMEOUT_MS: number;
|
|
58
|
+
/** Checks a tool against the common contract; the error says which rule it breaks. */
|
|
59
|
+
export declare function defineTool<Input, Output>(tool: ToolDefinition<Input, Output>): ToolDefinition<Input, Output>;
|
|
60
|
+
/** Checks a whole server: its name, unique tool names and that each tool belongs to it. */
|
|
61
|
+
export declare function defineServer(server: ServerDefinition): ServerDefinition;
|
package/dist/tool.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const SERVER_NAME = /^[a-z][a-z0-9]*$/;
|
|
2
|
+
const TOOL_NAME = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)+$/;
|
|
3
|
+
const ANNOTATIONS = ['readOnlyHint', 'destructiveHint', 'idempotentHint', 'openWorldHint'];
|
|
4
|
+
export const DEFAULT_TIMEOUT_MS = 120_000;
|
|
5
|
+
export const MAX_TIMEOUT_MS = 30 * 60_000;
|
|
6
|
+
function checkObjectSchema(owner, schema) {
|
|
7
|
+
if (schema === undefined) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (schema.type !== 'object' || schema.additionalProperties !== false || typeof schema.properties !== 'object') {
|
|
11
|
+
throw new TypeError(owner + ': schemas must be objects with additionalProperties: false');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** Checks a tool against the common contract; the error says which rule it breaks. */
|
|
15
|
+
export function defineTool(tool) {
|
|
16
|
+
if (!TOOL_NAME.test(tool.name)) {
|
|
17
|
+
throw new TypeError('Tool name must be snake_case <extension>_<verb>_<object>: ' + tool.name);
|
|
18
|
+
}
|
|
19
|
+
if (typeof tool.description !== 'string' || tool.description.length < 10 || tool.description.length > 1024) {
|
|
20
|
+
throw new TypeError(tool.name + ': description must be 10 to 1024 characters');
|
|
21
|
+
}
|
|
22
|
+
checkObjectSchema(tool.name + ' input', tool.inputSchema);
|
|
23
|
+
checkObjectSchema(tool.name + ' output', tool.outputSchema);
|
|
24
|
+
for (const key of ANNOTATIONS) {
|
|
25
|
+
if (typeof tool.annotations?.[key] !== 'boolean') {
|
|
26
|
+
throw new TypeError(tool.name + ': annotation ' + key + ' is required');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (tool.annotations.readOnlyHint && tool.annotations.destructiveHint) {
|
|
30
|
+
throw new TypeError(tool.name + ': a read-only tool cannot be destructive');
|
|
31
|
+
}
|
|
32
|
+
if (tool.timeoutMs !== undefined && (!Number.isInteger(tool.timeoutMs) || tool.timeoutMs < 1 || tool.timeoutMs > MAX_TIMEOUT_MS)) {
|
|
33
|
+
throw new TypeError(tool.name + ': timeoutMs must be 1 ms to 30 min');
|
|
34
|
+
}
|
|
35
|
+
return tool;
|
|
36
|
+
}
|
|
37
|
+
/** Checks a whole server: its name, unique tool names and that each tool belongs to it. */
|
|
38
|
+
export function defineServer(server) {
|
|
39
|
+
if (!SERVER_NAME.test(server.name)) {
|
|
40
|
+
throw new TypeError('Server name must be lower case letters and digits: ' + server.name);
|
|
41
|
+
}
|
|
42
|
+
if (!/^\d+\.\d+\.\d+/.test(server.version)) {
|
|
43
|
+
throw new TypeError('Server version must be semantic: ' + server.version);
|
|
44
|
+
}
|
|
45
|
+
const names = new Set();
|
|
46
|
+
for (const tool of server.tools) {
|
|
47
|
+
defineTool(tool);
|
|
48
|
+
if (!tool.name.startsWith(server.name + '_')) {
|
|
49
|
+
throw new TypeError(tool.name + ': tool names must start with ' + server.name + '_');
|
|
50
|
+
}
|
|
51
|
+
if (names.has(tool.name)) {
|
|
52
|
+
throw new TypeError('Duplicate tool name: ' + tool.name);
|
|
53
|
+
}
|
|
54
|
+
names.add(tool.name);
|
|
55
|
+
}
|
|
56
|
+
return server;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@armotusitio/mcp-kit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared kit for the MCP servers of the ArmotuSitio extensions: one contract, safe paths, secret redaction, stable errors and a tool manifest checked against what the server serves.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Alejandro Daniel Di Stefano",
|
|
8
|
+
"url": "https://armotusitio.com.ar"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://armotusitio.com.ar",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Drako01/armotusitio-mcp-kit.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/Drako01/armotusitio-mcp-kit/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"armotusitio",
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"vscode-extension",
|
|
23
|
+
"ai-tools"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"bin": {
|
|
33
|
+
"armotusitio-mcp-manifest": "dist/manifest-cli.js"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
|
+
"test": "node --test test/*.test.ts",
|
|
48
|
+
"check": "npm run typecheck && npm test",
|
|
49
|
+
"prepublishOnly": "npm run check && npm run build"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
53
|
+
"ajv": "^8.17.1"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^22.10.0",
|
|
57
|
+
"typescript": "^5.9.0"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"provenance": true
|
|
62
|
+
}
|
|
63
|
+
}
|