@okfit/mcp 0.6.7 → 0.7.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/index.d.ts CHANGED
@@ -144,6 +144,47 @@ export declare const ConceptResources: (projectRoot: string) => Layer.Layer<neve
144
144
  export declare const IndexResource: (projectRoot: string) => import("effect/Layer").Layer<never, never, import("@effected/xdg").AppDirs | FileSystem.FileSystem | Path.Path | import("@effected/xdg").Xdg>;
145
145
  //#endregion
146
146
  //#region src/schema/tools.d.ts
147
+ /** One Surface template inside a docs preset, as `describe_vocabulary` reports it. @public */
148
+ export declare const DocsPresetSurface: Schema.Struct<{
149
+ readonly file: Schema.String;
150
+ readonly frontmatter: Schema.Struct<{
151
+ readonly type: Schema.Literal<"Surface">;
152
+ readonly status: Schema.Literal<"draft">;
153
+ readonly title: Schema.String;
154
+ readonly description: Schema.String;
155
+ readonly kind: Schema.Literals<readonly ["site", "repo", "readme"]>;
156
+ readonly audience: Schema.Literals<readonly ["users", "contributors", "agents"]>;
157
+ readonly resource: Schema.String;
158
+ readonly links_to: Schema.optionalKey<Schema.String>;
159
+ readonly url: Schema.optionalKey<Schema.String>;
160
+ }>;
161
+ readonly body: Schema.String;
162
+ }>;
163
+ /** @public */
164
+ export type DocsPresetSurface = typeof DocsPresetSurface.Type;
165
+ /** One docs-surface preset the active profile offers. @public */
166
+ export declare const DocsPreset: Schema.Struct<{
167
+ readonly name: Schema.String;
168
+ readonly description: Schema.String;
169
+ readonly additive: Schema.Boolean;
170
+ readonly surfaces: Schema.$Array<Schema.Struct<{
171
+ readonly file: Schema.String;
172
+ readonly frontmatter: Schema.Struct<{
173
+ readonly type: Schema.Literal<"Surface">;
174
+ readonly status: Schema.Literal<"draft">;
175
+ readonly title: Schema.String;
176
+ readonly description: Schema.String;
177
+ readonly kind: Schema.Literals<readonly ["site", "repo", "readme"]>;
178
+ readonly audience: Schema.Literals<readonly ["users", "contributors", "agents"]>;
179
+ readonly resource: Schema.String;
180
+ readonly links_to: Schema.optionalKey<Schema.String>;
181
+ readonly url: Schema.optionalKey<Schema.String>;
182
+ }>;
183
+ readonly body: Schema.String;
184
+ }>>;
185
+ }>;
186
+ /** @public */
187
+ export type DocsPreset = typeof DocsPreset.Type;
147
188
  /** `describe_vocabulary`'s result (§5.2). @public */
148
189
  export declare const DescribeVocabularySuccess: Schema.Struct<{
149
190
  readonly project_root: Schema.String;
@@ -172,6 +213,26 @@ export declare const DescribeVocabularySuccess: Schema.Struct<{
172
213
  readonly name: Schema.String;
173
214
  readonly description: Schema.NullOr<Schema.String>;
174
215
  }>>;
216
+ readonly docs_presets: Schema.$Array<Schema.Struct<{
217
+ readonly name: Schema.String;
218
+ readonly description: Schema.String;
219
+ readonly additive: Schema.Boolean;
220
+ readonly surfaces: Schema.$Array<Schema.Struct<{
221
+ readonly file: Schema.String;
222
+ readonly frontmatter: Schema.Struct<{
223
+ readonly type: Schema.Literal<"Surface">;
224
+ readonly status: Schema.Literal<"draft">;
225
+ readonly title: Schema.String;
226
+ readonly description: Schema.String;
227
+ readonly kind: Schema.Literals<readonly ["site", "repo", "readme"]>;
228
+ readonly audience: Schema.Literals<readonly ["users", "contributors", "agents"]>;
229
+ readonly resource: Schema.String;
230
+ readonly links_to: Schema.optionalKey<Schema.String>;
231
+ readonly url: Schema.optionalKey<Schema.String>;
232
+ }>;
233
+ readonly body: Schema.String;
234
+ }>>;
235
+ }>>;
175
236
  }>;
176
237
  /** @public */
177
238
  export type DescribeVocabularySuccess = typeof DescribeVocabularySuccess.Type;
@@ -456,6 +517,26 @@ export declare const OkfitToolkit: Toolkit.Toolkit<{
456
517
  readonly name: import("effect/Schema").String;
457
518
  readonly description: import("effect/Schema").NullOr<import("effect/Schema").String>;
458
519
  }>>;
520
+ readonly docs_presets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
521
+ readonly name: import("effect/Schema").String;
522
+ readonly description: import("effect/Schema").String;
523
+ readonly additive: import("effect/Schema").Boolean;
524
+ readonly surfaces: import("effect/Schema").$Array<import("effect/Schema").Struct<{
525
+ readonly file: import("effect/Schema").String;
526
+ readonly frontmatter: import("effect/Schema").Struct<{
527
+ readonly type: import("effect/Schema").Literal<"Surface">;
528
+ readonly status: import("effect/Schema").Literal<"draft">;
529
+ readonly title: import("effect/Schema").String;
530
+ readonly description: import("effect/Schema").String;
531
+ readonly kind: import("effect/Schema").Literals<readonly ["site", "repo", "readme"]>;
532
+ readonly audience: import("effect/Schema").Literals<readonly ["users", "contributors", "agents"]>;
533
+ readonly resource: import("effect/Schema").String;
534
+ readonly links_to: import("effect/Schema").optionalKey<import("effect/Schema").String>;
535
+ readonly url: import("effect/Schema").optionalKey<import("effect/Schema").String>;
536
+ }>;
537
+ readonly body: import("effect/Schema").String;
538
+ }>>;
539
+ }>>;
459
540
  }>;
460
541
  readonly failure: import("effect/Schema").Union<readonly [typeof ConfigError, typeof BundleNotFound, typeof ConceptNotFound, typeof UnknownVocabulary, typeof InvalidArgument]>;
461
542
  readonly failureMode: "error";
@@ -646,6 +727,26 @@ export declare const ToolsLayer: (projectRoot: string, distribution?: Distributi
646
727
  readonly name: import("effect/Schema").String;
647
728
  readonly description: import("effect/Schema").NullOr<import("effect/Schema").String>;
648
729
  }>>;
730
+ readonly docs_presets: import("effect/Schema").$Array<import("effect/Schema").Struct<{
731
+ readonly name: import("effect/Schema").String;
732
+ readonly description: import("effect/Schema").String;
733
+ readonly additive: import("effect/Schema").Boolean;
734
+ readonly surfaces: import("effect/Schema").$Array<import("effect/Schema").Struct<{
735
+ readonly file: import("effect/Schema").String;
736
+ readonly frontmatter: import("effect/Schema").Struct<{
737
+ readonly type: import("effect/Schema").Literal<"Surface">;
738
+ readonly status: import("effect/Schema").Literal<"draft">;
739
+ readonly title: import("effect/Schema").String;
740
+ readonly description: import("effect/Schema").String;
741
+ readonly kind: import("effect/Schema").Literals<readonly ["site", "repo", "readme"]>;
742
+ readonly audience: import("effect/Schema").Literals<readonly ["users", "contributors", "agents"]>;
743
+ readonly resource: import("effect/Schema").String;
744
+ readonly links_to: import("effect/Schema").optionalKey<import("effect/Schema").String>;
745
+ readonly url: import("effect/Schema").optionalKey<import("effect/Schema").String>;
746
+ }>;
747
+ readonly body: import("effect/Schema").String;
748
+ }>>;
749
+ }>>;
649
750
  }>;
650
751
  readonly failure: import("effect/Schema").Union<readonly [typeof ConfigError, typeof BundleNotFound, typeof ConceptNotFound, typeof UnknownVocabulary, typeof InvalidArgument]>;
651
752
  readonly failureMode: "error";
package/index.js CHANGED
@@ -2,9 +2,9 @@ import { BundleNotFound, ConceptNotFound, ConfigError, InvalidArgument, McpToolE
2
2
  import { ConceptResources } from "./resources/conceptResource.js";
3
3
  import { IndexResource } from "./resources/indexResource.js";
4
4
  import { ConceptSummary, toConceptSummary } from "./schema/ConceptSummary.js";
5
- import { ConceptNeighborsSuccess, DescribeVocabularySuccess, GetConceptSuccess, ListConceptsParams, ListConceptsSuccess, Neighbor, StaleReportParams, StaleReportSuccess, ValidateBundleParams } from "./schema/tools.js";
5
+ import { ConceptNeighborsSuccess, DescribeVocabularySuccess, DocsPreset, DocsPresetSurface, GetConceptSuccess, ListConceptsParams, ListConceptsSuccess, Neighbor, StaleReportParams, StaleReportSuccess, ValidateBundleParams } from "./schema/tools.js";
6
6
  import { MCP_VERSION } from "./version.js";
7
7
  import { OkfitToolkit, ToolsLayer } from "./toolkit.js";
8
8
  import { SERVER_INSTRUCTIONS, ServerLayer } from "./server.js";
9
9
 
10
- export { BundleNotFound, ConceptNeighborsSuccess, ConceptNotFound, ConceptResources, ConceptSummary, ConfigError, DescribeVocabularySuccess, GetConceptSuccess, IndexResource, InvalidArgument, ListConceptsParams, ListConceptsSuccess, MCP_VERSION, McpToolError, Neighbor, OkfitToolkit, Remediation, SERVER_INSTRUCTIONS, ServerLayer, StaleReportParams, StaleReportSuccess, ToolsLayer, UnknownVocabulary, ValidateBundleParams, toConceptSummary };
10
+ export { BundleNotFound, ConceptNeighborsSuccess, ConceptNotFound, ConceptResources, ConceptSummary, ConfigError, DescribeVocabularySuccess, DocsPreset, DocsPresetSurface, GetConceptSuccess, IndexResource, InvalidArgument, ListConceptsParams, ListConceptsSuccess, MCP_VERSION, McpToolError, Neighbor, OkfitToolkit, Remediation, SERVER_INSTRUCTIONS, ServerLayer, StaleReportParams, StaleReportSuccess, ToolsLayer, UnknownVocabulary, ValidateBundleParams, toConceptSummary };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okfit/mcp",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
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": [
@@ -52,14 +52,14 @@
52
52
  "@effected/jsonc": "^0.15.0",
53
53
  "@effected/markdown": "^0.15.0",
54
54
  "@effected/mcp": "^0.4.0",
55
- "@effected/schemastore": "^0.18.0",
55
+ "@effected/schemastore": "^0.20.0",
56
56
  "@effected/toml": "^0.11.0",
57
57
  "@effected/walker": "^0.15.0",
58
58
  "@effected/xdg": "^0.9.0",
59
59
  "@effected/yaml": "^0.19.0",
60
- "@okfit/core": "0.8.4",
61
- "@okfit/engine": "0.11.0",
62
- "@okfit/profiles": "0.8.3",
60
+ "@okfit/core": "0.9.0",
61
+ "@okfit/engine": "0.12.0",
62
+ "@okfit/profiles": "0.9.0",
63
63
  "effect": "^4.0.0"
64
64
  },
65
65
  "engines": {
package/schema/tools.js CHANGED
@@ -4,6 +4,37 @@ import { GraphNodeKind, Status } from "@okfit/core";
4
4
  import { ContextTag, ContextType } from "@okfit/engine";
5
5
 
6
6
  //#region src/schema/tools.ts
7
+ /** One Surface template inside a docs preset, as `describe_vocabulary` reports it. @public */
8
+ const DocsPresetSurface = Schema.Struct({
9
+ file: Schema.String,
10
+ frontmatter: Schema.Struct({
11
+ type: Schema.Literal("Surface"),
12
+ status: Schema.Literal("draft"),
13
+ title: Schema.String,
14
+ description: Schema.String,
15
+ kind: Schema.Literals([
16
+ "site",
17
+ "repo",
18
+ "readme"
19
+ ]),
20
+ audience: Schema.Literals([
21
+ "users",
22
+ "contributors",
23
+ "agents"
24
+ ]),
25
+ resource: Schema.String,
26
+ links_to: Schema.optionalKey(Schema.String),
27
+ url: Schema.optionalKey(Schema.String)
28
+ }),
29
+ body: Schema.String
30
+ });
31
+ /** One docs-surface preset the active profile offers. @public */
32
+ const DocsPreset = Schema.Struct({
33
+ name: Schema.String,
34
+ description: Schema.String,
35
+ additive: Schema.Boolean,
36
+ surfaces: Schema.Array(DocsPresetSurface)
37
+ });
7
38
  /** `describe_vocabulary`'s result (§5.2). @public */
8
39
  const DescribeVocabularySuccess = Schema.Struct({
9
40
  project_root: Schema.String,
@@ -13,7 +44,8 @@ const DescribeVocabularySuccess = Schema.Struct({
13
44
  profile_requested: Schema.NullOr(Schema.String),
14
45
  agent: Schema.NullOr(Schema.String),
15
46
  types: Schema.Array(ContextType),
16
- tags: Schema.Array(ContextTag)
47
+ tags: Schema.Array(ContextTag),
48
+ docs_presets: Schema.Array(DocsPreset)
17
49
  });
18
50
  /** `list_concepts`' arguments (§5.3). @public */
19
51
  const ListConceptsParams = Schema.Struct({
@@ -83,4 +115,4 @@ const ValidateBundleParams = Schema.Struct({
83
115
  });
84
116
 
85
117
  //#endregion
86
- export { ConceptNeighborsSuccess, DescribeVocabularySuccess, GetConceptSuccess, ListConceptsParams, ListConceptsSuccess, Neighbor, StaleReportParams, StaleReportSuccess, ValidateBundleDocument, ValidateBundleParams };
118
+ export { ConceptNeighborsSuccess, DescribeVocabularySuccess, DocsPreset, DocsPresetSurface, GetConceptSuccess, ListConceptsParams, ListConceptsSuccess, Neighbor, StaleReportParams, StaleReportSuccess, ValidateBundleDocument, ValidateBundleParams };
@@ -7,7 +7,7 @@ import { contextEnvelope } from "@okfit/engine";
7
7
  import { AppDirs, Xdg } from "@effected/xdg";
8
8
 
9
9
  //#region src/tools/describeVocabulary.ts
10
- const DESCRIPTION = "Returns this project's resolved okfit configuration: the project root, bundle root, active profile, configured agent actor, and the full set of concept types and tags the config declares, each with its description. Call this first, before filtering or writing any concept, to learn which type and tag names actually exist in this project.";
10
+ const DESCRIPTION = "Returns this project's resolved okfit configuration: project root, bundle root, active profile, agent actor, every concept type and tag the config declares, and docs_presets, the active profile's Surface templates (empty without a profile). Call this first, before filtering or writing any concept, to learn which names exist.";
11
11
  /**
12
12
  * `dependencies` names the platform services `handleDescribeVocabulary`
13
13
  * needs (`resolveConfigOnly` -> `resolveProjectConfig`/`provideConfig`);
@@ -57,6 +57,10 @@ const handleDescribeVocabulary = (projectRoot) => Effect.gen(function* () {
57
57
  indexExists: false,
58
58
  config: resolved.config
59
59
  });
60
+ const docsPresets = Option.match(resolved.profile, {
61
+ onNone: () => [],
62
+ onSome: (p) => p.docsPresets
63
+ });
60
64
  return {
61
65
  project_root: envelope.project_root,
62
66
  bundle_root: envelope.bundle_root,
@@ -65,7 +69,17 @@ const handleDescribeVocabulary = (projectRoot) => Effect.gen(function* () {
65
69
  profile_requested: envelope.profile_requested,
66
70
  agent: envelope.actors.agent,
67
71
  types: envelope.types,
68
- tags: envelope.tags
72
+ tags: envelope.tags,
73
+ docs_presets: docsPresets.map((preset) => ({
74
+ name: preset.name,
75
+ description: preset.description,
76
+ additive: preset.additive,
77
+ surfaces: preset.surfaces.map((s) => ({
78
+ file: s.file,
79
+ frontmatter: s.frontmatter,
80
+ body: s.body
81
+ }))
82
+ }))
69
83
  };
70
84
  });
71
85
 
package/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @public
7
7
  */
8
- const MCP_VERSION = "0.6.7";
8
+ const MCP_VERSION = "0.7.0";
9
9
 
10
10
  //#endregion
11
11
  export { MCP_VERSION };