@convesoft/mara 0.1.0-alpha.0 → 0.1.0-alpha.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.
- package/README.md +53 -5
- package/bin/mara-plugin.cjs +57 -0
- package/mcp.json +10 -0
- package/package.json +9 -5
- package/plugin.json +19 -0
- package/skills/mara/SKILL.md +40 -0
package/README.md
CHANGED
|
@@ -32,14 +32,62 @@ command = "npx"
|
|
|
32
32
|
args = ["-y", "@convesoft/mara@0.1.0-alpha.0", "mcp"]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
To bind the server to one project regardless of its execution directory, place
|
|
36
|
+
`--project` after `mcp`:
|
|
36
37
|
|
|
37
|
-
```
|
|
38
|
-
|
|
38
|
+
```toml
|
|
39
|
+
[mcp_servers.mara]
|
|
40
|
+
command = "npx"
|
|
41
|
+
args = [
|
|
42
|
+
"-y",
|
|
43
|
+
"@convesoft/mara@0.1.0-alpha.0",
|
|
44
|
+
"mcp",
|
|
45
|
+
"--project",
|
|
46
|
+
"/absolute/path/to/project",
|
|
47
|
+
]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Without `--project`, the server can start anywhere. Project-bound tools accept
|
|
51
|
+
an absolute `project` path or discover the nearest parent containing
|
|
52
|
+
`.mara/project.toml` from the server's execution directory.
|
|
53
|
+
|
|
54
|
+
## Agent Plugin package
|
|
55
|
+
|
|
56
|
+
The main npm package also contains a portable Agent Plugins 1.0 manifest, a
|
|
57
|
+
Mara skill, and stdio MCP configuration. Compatible clients can install that
|
|
58
|
+
package through their supported plugin distribution flow. Codex is the
|
|
59
|
+
reference client; the portable package does not modify project `AGENTS.md`.
|
|
60
|
+
|
|
61
|
+
Starting with `0.1.0-alpha.1`, a user without an existing Mara installation can
|
|
62
|
+
install the complete package from the Convesoft Codex marketplace:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
codex plugin marketplace add convesoft/mara
|
|
66
|
+
codex plugin add mara@convesoft
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Start a new Codex session after installation. Codex keeps an installed plugin
|
|
70
|
+
snapshot in its managed cache. On first MCP start, its launcher uses `npx` to
|
|
71
|
+
install and run that snapshot's exact Mara version with the matching native
|
|
72
|
+
package in npm's cache.
|
|
73
|
+
|
|
74
|
+
If Mara and its MCP server are already configured, install only the skill and
|
|
75
|
+
keep using that existing executable:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx skills add convesoft/mara --skill mara -g -a codex
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For a new MCP registration backed by an existing installation, use the
|
|
82
|
+
executable's absolute path:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
codex mcp add mara -- /absolute/path/to/mara mcp
|
|
39
86
|
```
|
|
40
87
|
|
|
41
|
-
|
|
42
|
-
|
|
88
|
+
Use either the complete plugin or the existing-installation route. Do not add
|
|
89
|
+
the complete plugin alongside an equivalent manually configured Mara MCP
|
|
90
|
+
server.
|
|
43
91
|
|
|
44
92
|
## Core workflow
|
|
45
93
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const { spawn } = require("node:child_process");
|
|
7
|
+
|
|
8
|
+
const packages = new Map([
|
|
9
|
+
["linux:x64", "@convesoft/mara-linux-x64-gnu"],
|
|
10
|
+
["linux:arm64", "@convesoft/mara-linux-arm64-gnu"],
|
|
11
|
+
["darwin:x64", "@convesoft/mara-darwin-x64"],
|
|
12
|
+
["darwin:arm64", "@convesoft/mara-darwin-arm64"],
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
const manifest = require("../package.json");
|
|
16
|
+
const packageName = packages.get(`${process.platform}:${process.arch}`);
|
|
17
|
+
let hasLocalRuntime = false;
|
|
18
|
+
|
|
19
|
+
if (packageName !== undefined) {
|
|
20
|
+
try {
|
|
21
|
+
require.resolve(`${packageName}/package.json`);
|
|
22
|
+
hasLocalRuntime = true;
|
|
23
|
+
} catch {
|
|
24
|
+
// Codex extracts npm plugin packages without installing their dependencies.
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const command = hasLocalRuntime ? process.execPath : "npx";
|
|
29
|
+
const args = hasLocalRuntime
|
|
30
|
+
? [path.join(__dirname, "mara.cjs"), ...process.argv.slice(2)]
|
|
31
|
+
: ["--yes", `${manifest.name}@${manifest.version}`, ...process.argv.slice(2)];
|
|
32
|
+
const child = spawn(command, args, { stdio: "inherit" });
|
|
33
|
+
const signals = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
34
|
+
const forward = new Map();
|
|
35
|
+
|
|
36
|
+
for (const signal of signals) {
|
|
37
|
+
const handler = () => child.kill(signal);
|
|
38
|
+
forward.set(signal, handler);
|
|
39
|
+
process.on(signal, handler);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
child.once("error", (error) => {
|
|
43
|
+
console.error(`Could not start Mara from the Agent Plugin: ${error.message}`);
|
|
44
|
+
process.exitCode = 1;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
child.once("exit", (code, signal) => {
|
|
48
|
+
for (const [name, handler] of forward) {
|
|
49
|
+
process.off(name, handler);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (signal !== null) {
|
|
53
|
+
process.kill(process.pid, signal);
|
|
54
|
+
} else {
|
|
55
|
+
process.exitCode = code ?? 1;
|
|
56
|
+
}
|
|
57
|
+
});
|
package/mcp.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@convesoft/mara",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
4
|
"description": "Structured project knowledge CLI and MCP server",
|
|
5
5
|
"author": "Aliaksei Raketski",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
@@ -18,13 +18,17 @@
|
|
|
18
18
|
"node": ">=18"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@convesoft/mara-linux-x64-gnu": "0.1.0-alpha.
|
|
22
|
-
"@convesoft/mara-linux-arm64-gnu": "0.1.0-alpha.
|
|
23
|
-
"@convesoft/mara-darwin-x64": "0.1.0-alpha.
|
|
24
|
-
"@convesoft/mara-darwin-arm64": "0.1.0-alpha.
|
|
21
|
+
"@convesoft/mara-linux-x64-gnu": "0.1.0-alpha.1",
|
|
22
|
+
"@convesoft/mara-linux-arm64-gnu": "0.1.0-alpha.1",
|
|
23
|
+
"@convesoft/mara-darwin-x64": "0.1.0-alpha.1",
|
|
24
|
+
"@convesoft/mara-darwin-arm64": "0.1.0-alpha.1"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"bin/mara.cjs",
|
|
28
|
+
"bin/mara-plugin.cjs",
|
|
29
|
+
"plugin.json",
|
|
30
|
+
"mcp.json",
|
|
31
|
+
"skills/mara/SKILL.md",
|
|
28
32
|
"README.md",
|
|
29
33
|
"LICENSE-MIT",
|
|
30
34
|
"LICENSE-APACHE"
|
package/plugin.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
|
+
"name": "mara",
|
|
4
|
+
"description": "Discover, author, relate, and validate structured project knowledge.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Convesoft",
|
|
7
|
+
"url": "https://github.com/convesoft"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/convesoft/mara",
|
|
10
|
+
"repository": "https://github.com/convesoft/mara",
|
|
11
|
+
"license": "MIT OR Apache-2.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"project-knowledge",
|
|
14
|
+
"requirements",
|
|
15
|
+
"mcp",
|
|
16
|
+
"agent-skill"
|
|
17
|
+
],
|
|
18
|
+
"version": "0.1.0-alpha.1"
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mara
|
|
3
|
+
description: Use Mara to initialize, discover, author, relate, retrieve, search, or validate structured project knowledge in Git-tracked *.mara.md files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mara project knowledge
|
|
7
|
+
|
|
8
|
+
Use the Mara MCP tools as the structured interface to a project's canonical
|
|
9
|
+
`*.mara.md` knowledge.
|
|
10
|
+
|
|
11
|
+
## Select the project
|
|
12
|
+
|
|
13
|
+
- Resolve the intended project root to an absolute path.
|
|
14
|
+
- Pass that path as `project` on every project-bound tool call unless the MCP
|
|
15
|
+
server was explicitly started with `mara mcp --project PATH`.
|
|
16
|
+
- If `project` is omitted, Mara discovers the nearest project from the MCP
|
|
17
|
+
server's execution directory.
|
|
18
|
+
- Treat each operation as scoped to one project. Do not infer workspace or
|
|
19
|
+
cross-project behavior.
|
|
20
|
+
|
|
21
|
+
If the intended root has no `.mara/project.toml` and the user wants to start a
|
|
22
|
+
Mara project, call `project_init` with the absolute root, or omit `project` when
|
|
23
|
+
the MCP server was started with that root bound by `--project`. Use the default
|
|
24
|
+
`minimal` template unless the user explicitly requests `empty`. Do not create
|
|
25
|
+
or modify `AGENTS.md` as part of Mara onboarding.
|
|
26
|
+
|
|
27
|
+
## Work with the corpus
|
|
28
|
+
|
|
29
|
+
1. Call `schema_get` before authoring unfamiliar flavours, fields, or relations.
|
|
30
|
+
2. Use `item_search`, `item_list`, and `item_related` for bounded discovery;
|
|
31
|
+
call `item_get` only for selected full items.
|
|
32
|
+
3. Use `item_create`, `relation_add`, and `relation_remove` only when the user
|
|
33
|
+
has asked to change project knowledge.
|
|
34
|
+
4. Run the narrowest relevant validation after a mutation and use
|
|
35
|
+
`project_validate` when the requested work affects corpus-wide integrity.
|
|
36
|
+
|
|
37
|
+
Mara source files remain canonical. Do not treat MCP results as a separate
|
|
38
|
+
authoring store. Structured update, move, rename, and delete operations are not
|
|
39
|
+
available yet; when one is required, edit the source file directly and validate
|
|
40
|
+
the result.
|