@okfit/mcp 0.10.0 → 0.10.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/internal/toolContext.js +3 -14
- package/internal/toolSignals.js +2 -2
- package/package.json +19 -18
- package/tsdoc-metadata.json +1 -1
- package/version.js +1 -1
package/internal/toolContext.js
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
|
+
import { ErrorText } from "@effected/engine";
|
|
1
2
|
import { ToolRefusal } from "@effected/mcp";
|
|
2
3
|
import { Bundle } from "@okfit/core";
|
|
3
4
|
import { Effect, Option } from "effect";
|
|
4
5
|
import { provideConfig, resolveProjectConfig } from "@okfit/engine";
|
|
5
6
|
|
|
6
7
|
// src/internal/toolContext.ts
|
|
7
|
-
/**
|
|
8
|
-
* The error's `message` when it has one as a string, else `String(error)`.
|
|
9
|
-
* A four-line local copy of `CLI/render/json.ts`'s own helper, which is
|
|
10
|
-
* module-private there and cannot be imported.
|
|
11
|
-
*/
|
|
12
|
-
const messageOf = (error) => {
|
|
13
|
-
if (typeof error === "object" && error !== null && "message" in error) {
|
|
14
|
-
const message = error.message;
|
|
15
|
-
if (typeof message === "string") return message;
|
|
16
|
-
}
|
|
17
|
-
return String(error);
|
|
18
|
-
};
|
|
19
8
|
const CONFIG_HINT = "Check the project's .okfit.toml, okfit.toml, or .config/okfit.toml for a syntax or schema error; remove it to fall back to defaults.";
|
|
20
9
|
/**
|
|
21
10
|
* Config resolution alone, with every failure collapsed to a `ToolRefusal`.
|
|
@@ -42,7 +31,7 @@ const resolveConfigOnly = (projectRoot) => resolveProjectConfig({
|
|
|
42
31
|
hint: CONFIG_HINT,
|
|
43
32
|
suggestedTool: "describe_vocabulary"
|
|
44
33
|
};
|
|
45
|
-
return ToolRefusal.refuse(
|
|
34
|
+
return ToolRefusal.refuse(ErrorText.describe(cause), remediation);
|
|
46
35
|
}));
|
|
47
36
|
/**
|
|
48
37
|
* Resolve config and load the bundle, fresh, for one tool call (N-9). No
|
|
@@ -66,4 +55,4 @@ const loadToolContext = (projectRoot) => Effect.gen(function* () {
|
|
|
66
55
|
};
|
|
67
56
|
});
|
|
68
57
|
|
|
69
|
-
export { loadToolContext,
|
|
58
|
+
export { loadToolContext, resolveConfigOnly };
|
package/internal/toolSignals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ErrorText } from "@effected/engine";
|
|
2
2
|
import { ToolRefusal } from "@effected/mcp";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
import { Trust } from "@okfit/profiles";
|
|
@@ -10,6 +10,6 @@ import { Trust } from "@okfit/profiles";
|
|
|
10
10
|
*
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
const toolSignals = (bundle, config, now) => Trust.signals(bundle, config, now).pipe(Effect.mapError((cause) => ToolRefusal.refuse(
|
|
13
|
+
const toolSignals = (bundle, config, now) => Trust.signals(bundle, config, now).pipe(Effect.mapError((cause) => ToolRefusal.refuse(ErrorText.describe(cause), { hint: "A concept file could not be read to check its verification; retry once the bundle is readable." })));
|
|
14
14
|
|
|
15
15
|
export { toolSignals };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okfit/mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Model Context Protocol server for okfit: query and understand Open Knowledge Format (OKF) bundles from an agent.",
|
|
6
6
|
"keywords": [
|
|
@@ -44,23 +44,24 @@
|
|
|
44
44
|
"okfit-mcp": "bin/okfit-mcp.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@effect/platform-node": "^4.0.
|
|
48
|
-
"@effected/config-file": "^0.
|
|
49
|
-
"@effected/engine": "^0.
|
|
50
|
-
"@effected/git": "^0.
|
|
51
|
-
"@effected/glob": "^0.
|
|
52
|
-
"@effected/jsonc": "^0.
|
|
53
|
-
"@effected/markdown": "^0.
|
|
54
|
-
"@effected/mcp": "^0.
|
|
55
|
-
"@effected/schemastore": "^0.
|
|
56
|
-
"@effected/
|
|
57
|
-
"@effected/
|
|
58
|
-
"@effected/
|
|
59
|
-
"@effected/
|
|
60
|
-
"@
|
|
61
|
-
"@okfit/
|
|
62
|
-
"@okfit/
|
|
63
|
-
"
|
|
47
|
+
"@effect/platform-node": "^4.0.7",
|
|
48
|
+
"@effected/config-file": "^0.22.0",
|
|
49
|
+
"@effected/engine": "^0.10.0",
|
|
50
|
+
"@effected/git": "^0.27.0",
|
|
51
|
+
"@effected/glob": "^0.16.0",
|
|
52
|
+
"@effected/jsonc": "^0.21.0",
|
|
53
|
+
"@effected/markdown": "^0.24.0",
|
|
54
|
+
"@effected/mcp": "^0.11.0",
|
|
55
|
+
"@effected/schemastore": "^0.27.0",
|
|
56
|
+
"@effected/source": "^0.1.0",
|
|
57
|
+
"@effected/toml": "^0.17.0",
|
|
58
|
+
"@effected/walker": "^0.22.0",
|
|
59
|
+
"@effected/xdg": "^0.17.0",
|
|
60
|
+
"@effected/yaml": "^0.26.0",
|
|
61
|
+
"@okfit/core": "0.11.8",
|
|
62
|
+
"@okfit/engine": "0.18.2",
|
|
63
|
+
"@okfit/profiles": "0.13.0",
|
|
64
|
+
"effect": "^4.0.7"
|
|
64
65
|
},
|
|
65
66
|
"engines": {
|
|
66
67
|
"node": ">=24.11.0"
|
package/tsdoc-metadata.json
CHANGED