@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.
@@ -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(messageOf(cause), remediation);
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, messageOf, resolveConfigOnly };
58
+ export { loadToolContext, resolveConfigOnly };
@@ -1,4 +1,4 @@
1
- import { messageOf } from "./toolContext.js";
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(messageOf(cause), { hint: "A concept file could not be read to check its verification; retry once the bundle is readable." })));
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.0",
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.6",
48
- "@effected/config-file": "^0.21.0",
49
- "@effected/engine": "^0.9.0",
50
- "@effected/git": "^0.26.0",
51
- "@effected/glob": "^0.15.0",
52
- "@effected/jsonc": "^0.20.1",
53
- "@effected/markdown": "^0.23.0",
54
- "@effected/mcp": "^0.10.0",
55
- "@effected/schemastore": "^0.26.3",
56
- "@effected/toml": "^0.16.0",
57
- "@effected/walker": "^0.21.0",
58
- "@effected/xdg": "^0.16.0",
59
- "@effected/yaml": "^0.25.1",
60
- "@okfit/core": "0.11.7",
61
- "@okfit/engine": "0.18.1",
62
- "@okfit/profiles": "0.12.0",
63
- "effect": "^4.0.6"
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"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.4"
8
+ "packageVersion": "7.60.0"
9
9
  }
10
10
  ]
11
11
  }
package/version.js CHANGED
@@ -5,6 +5,6 @@
5
5
  *
6
6
  * @public
7
7
  */
8
- const MCP_VERSION = "0.10.0";
8
+ const MCP_VERSION = "0.10.1";
9
9
 
10
10
  export { MCP_VERSION };