@orchestrator-claude/mcp-server 3.31.0 → 3.31.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/dist/PerplexityMcpServer.d.ts +1 -1
- package/dist/PerplexityMcpServer.d.ts.map +1 -1
- package/dist/PerplexityMcpServer.js +11 -7
- package/dist/PerplexityMcpServer.js.map +1 -1
- package/dist/client/OrchestratorApiClient.d.ts +2 -2
- package/dist/client/OrchestratorApiClient.d.ts.map +1 -1
- package/dist/client/OrchestratorApiClient.js +66 -50
- package/dist/client/OrchestratorApiClient.js.map +1 -1
- package/dist/client/types.d.ts +1 -1
- package/dist/client/types.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/errors/McpApiError.d.ts +2 -2
- package/dist/errors/McpApiError.d.ts.map +1 -1
- package/dist/errors/McpApiError.js +8 -2
- package/dist/errors/McpApiError.js.map +1 -1
- package/dist/external/PerplexityClient.d.ts.map +1 -1
- package/dist/external/PerplexityClient.js +8 -8
- package/dist/external/PerplexityClient.js.map +1 -1
- package/dist/external/PerplexityConfig.js +1 -1
- package/dist/external/PerplexityConfig.js.map +1 -1
- package/dist/handlers/agent-definitions-handlers.d.ts +16 -30
- package/dist/handlers/agent-definitions-handlers.d.ts.map +1 -1
- package/dist/handlers/agent-definitions-handlers.js.map +1 -1
- package/dist/handlers/artifact-content-handlers.d.ts +16 -30
- package/dist/handlers/artifact-content-handlers.d.ts.map +1 -1
- package/dist/handlers/artifact-content-handlers.js.map +1 -1
- package/dist/handlers/checkpoints-handlers.d.ts +13 -12
- package/dist/handlers/checkpoints-handlers.d.ts.map +1 -1
- package/dist/handlers/checkpoints-handlers.js.map +1 -1
- package/dist/handlers/freshness-handlers.d.ts +12 -6
- package/dist/handlers/freshness-handlers.d.ts.map +1 -1
- package/dist/handlers/freshness-handlers.js.map +1 -1
- package/dist/handlers/gate-handlers.d.ts +13 -24
- package/dist/handlers/gate-handlers.d.ts.map +1 -1
- package/dist/handlers/gate-handlers.js.map +1 -1
- package/dist/handlers/graphrag-handlers.d.ts +14 -18
- package/dist/handlers/graphrag-handlers.d.ts.map +1 -1
- package/dist/handlers/graphrag-handlers.js.map +1 -1
- package/dist/handlers/hooks-handlers.d.ts +17 -36
- package/dist/handlers/hooks-handlers.d.ts.map +1 -1
- package/dist/handlers/hooks-handlers.js.map +1 -1
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +142 -40
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/kb-documents-handlers.d.ts +14 -18
- package/dist/handlers/kb-documents-handlers.d.ts.map +1 -1
- package/dist/handlers/kb-documents-handlers.js.map +1 -1
- package/dist/handlers/kb-graph-handlers.d.ts +14 -18
- package/dist/handlers/kb-graph-handlers.d.ts.map +1 -1
- package/dist/handlers/kb-graph-handlers.js.map +1 -1
- package/dist/handlers/kb-handlers.d.ts +15 -24
- package/dist/handlers/kb-handlers.d.ts.map +1 -1
- package/dist/handlers/kb-handlers.js.map +1 -1
- package/dist/handlers/metrics-handlers.d.ts +15 -48
- package/dist/handlers/metrics-handlers.d.ts.map +1 -1
- package/dist/handlers/metrics-handlers.js.map +1 -1
- package/dist/handlers/patterns-handlers.d.ts +13 -12
- package/dist/handlers/patterns-handlers.d.ts.map +1 -1
- package/dist/handlers/patterns-handlers.js.map +1 -1
- package/dist/handlers/pending-action-handlers.d.ts +15 -48
- package/dist/handlers/pending-action-handlers.d.ts.map +1 -1
- package/dist/handlers/pending-action-handlers.js.map +1 -1
- package/dist/handlers/projects-handlers.d.ts +14 -18
- package/dist/handlers/projects-handlers.d.ts.map +1 -1
- package/dist/handlers/projects-handlers.js.map +1 -1
- package/dist/handlers/schemas-handlers.d.ts +16 -30
- package/dist/handlers/schemas-handlers.d.ts.map +1 -1
- package/dist/handlers/schemas-handlers.js.map +1 -1
- package/dist/handlers/skill-definitions-handlers.d.ts +16 -30
- package/dist/handlers/skill-definitions-handlers.d.ts.map +1 -1
- package/dist/handlers/skill-definitions-handlers.js.map +1 -1
- package/dist/handlers/stack-conventions-handlers.d.ts +12 -6
- package/dist/handlers/stack-conventions-handlers.d.ts.map +1 -1
- package/dist/handlers/stack-conventions-handlers.js.map +1 -1
- package/dist/handlers/templates-handlers.d.ts +16 -30
- package/dist/handlers/templates-handlers.d.ts.map +1 -1
- package/dist/handlers/templates-handlers.js.map +1 -1
- package/dist/handlers/workflow-definitions-handlers.d.ts +16 -30
- package/dist/handlers/workflow-definitions-handlers.d.ts.map +1 -1
- package/dist/handlers/workflow-definitions-handlers.js.map +1 -1
- package/dist/handlers/workflow-handlers.d.ts +23 -109
- package/dist/handlers/workflow-handlers.d.ts.map +1 -1
- package/dist/handlers/workflow-handlers.js +1 -1
- package/dist/handlers/workflow-handlers.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,34 +4,30 @@
|
|
|
4
4
|
* Handlers for GraphRAG tools (searchByEmbedding, enrichContext, findMandatoryPatterns).
|
|
5
5
|
*/
|
|
6
6
|
import type { IOrchestratorApiClient } from '../client/types.js';
|
|
7
|
+
interface McpTextContent {
|
|
8
|
+
type: 'text';
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
type McpResponse = {
|
|
12
|
+
content: McpTextContent[];
|
|
13
|
+
} | {
|
|
14
|
+
content: McpTextContent[];
|
|
15
|
+
isError: true;
|
|
16
|
+
};
|
|
7
17
|
export declare function createSearchByEmbeddingHandler(client: IOrchestratorApiClient): (args: {
|
|
8
18
|
query: string;
|
|
9
19
|
limit?: number;
|
|
10
20
|
threshold?: number;
|
|
11
21
|
tags?: string[];
|
|
12
|
-
}) => Promise<
|
|
13
|
-
content: {
|
|
14
|
-
type: "text";
|
|
15
|
-
text: string;
|
|
16
|
-
}[];
|
|
17
|
-
}>;
|
|
22
|
+
}) => Promise<McpResponse>;
|
|
18
23
|
export declare function createEnrichContextHandler(client: IOrchestratorApiClient): (args: {
|
|
19
24
|
query: string;
|
|
20
25
|
maxDocuments?: number;
|
|
21
26
|
includeGraph?: boolean;
|
|
22
27
|
includeVector?: boolean;
|
|
23
|
-
}) => Promise<
|
|
24
|
-
content: {
|
|
25
|
-
type: "text";
|
|
26
|
-
text: string;
|
|
27
|
-
}[];
|
|
28
|
-
}>;
|
|
28
|
+
}) => Promise<McpResponse>;
|
|
29
29
|
export declare function createFindMandatoryPatternsHandler(client: IOrchestratorApiClient): (args: {
|
|
30
30
|
artifactType: string;
|
|
31
|
-
}) => Promise<
|
|
32
|
-
|
|
33
|
-
type: "text";
|
|
34
|
-
text: string;
|
|
35
|
-
}[];
|
|
36
|
-
}>;
|
|
31
|
+
}) => Promise<McpResponse>;
|
|
32
|
+
export {};
|
|
37
33
|
//# sourceMappingURL=graphrag-handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphrag-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/graphrag-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphrag-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/graphrag-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AACD,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AAsBhG,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IACR,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,KAAK,OAAO,CAAC,WAAW,CAAC,CAkBzB;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IACR,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,KAAK,OAAO,CAAC,WAAW,CAAC,CAkBzB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,WAAW,CAAC,CAS1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphrag-handlers.js","sourceRoot":"","sources":["../../src/handlers/graphrag-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"graphrag-handlers.js","sourceRoot":"","sources":["../../src/handlers/graphrag-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQvD,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,K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,CAAC,CAAC;YACH,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,MAA8B;IAE9B,OAAO,KAAK,EAAE,IAA8B,EAAwB,EAAE;QACpE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACrE,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -4,37 +4,32 @@
|
|
|
4
4
|
* Handlers for Hook-related MCP tools (listHooks, getHook, getHookBySlug, createHook, updateHook, deprecateHook).
|
|
5
5
|
*/
|
|
6
6
|
import type { IOrchestratorApiClient } from '../client/types.js';
|
|
7
|
+
interface McpTextContent {
|
|
8
|
+
type: 'text';
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
type McpResponse = {
|
|
12
|
+
content: McpTextContent[];
|
|
13
|
+
} | {
|
|
14
|
+
content: McpTextContent[];
|
|
15
|
+
isError: true;
|
|
16
|
+
};
|
|
7
17
|
/**
|
|
8
18
|
* Creates handler for listHooks tool
|
|
9
19
|
*/
|
|
10
|
-
export declare function createListHooksHandler(client: IOrchestratorApiClient): () => Promise<
|
|
11
|
-
content: {
|
|
12
|
-
type: "text";
|
|
13
|
-
text: string;
|
|
14
|
-
}[];
|
|
15
|
-
}>;
|
|
20
|
+
export declare function createListHooksHandler(client: IOrchestratorApiClient): () => Promise<McpResponse>;
|
|
16
21
|
/**
|
|
17
22
|
* Creates handler for getHook tool
|
|
18
23
|
*/
|
|
19
24
|
export declare function createGetHookHandler(client: IOrchestratorApiClient): (args: {
|
|
20
25
|
id: string;
|
|
21
|
-
}) => Promise<
|
|
22
|
-
content: {
|
|
23
|
-
type: "text";
|
|
24
|
-
text: string;
|
|
25
|
-
}[];
|
|
26
|
-
}>;
|
|
26
|
+
}) => Promise<McpResponse>;
|
|
27
27
|
/**
|
|
28
28
|
* Creates handler for getHookBySlug tool
|
|
29
29
|
*/
|
|
30
30
|
export declare function createGetHookBySlugHandler(client: IOrchestratorApiClient): (args: {
|
|
31
31
|
slug: string;
|
|
32
|
-
}) => Promise<
|
|
33
|
-
content: {
|
|
34
|
-
type: "text";
|
|
35
|
-
text: string;
|
|
36
|
-
}[];
|
|
37
|
-
}>;
|
|
32
|
+
}) => Promise<McpResponse>;
|
|
38
33
|
/**
|
|
39
34
|
* Creates handler for createHook tool
|
|
40
35
|
*/
|
|
@@ -48,12 +43,7 @@ export declare function createCreateHookHandler(client: IOrchestratorApiClient):
|
|
|
48
43
|
handlerConfig: unknown;
|
|
49
44
|
agent?: string;
|
|
50
45
|
enabled?: boolean;
|
|
51
|
-
}) => Promise<
|
|
52
|
-
content: {
|
|
53
|
-
type: "text";
|
|
54
|
-
text: string;
|
|
55
|
-
}[];
|
|
56
|
-
}>;
|
|
46
|
+
}) => Promise<McpResponse>;
|
|
57
47
|
/**
|
|
58
48
|
* Creates handler for updateHook tool
|
|
59
49
|
*/
|
|
@@ -61,21 +51,12 @@ export declare function createUpdateHookHandler(client: IOrchestratorApiClient):
|
|
|
61
51
|
id: string;
|
|
62
52
|
enabled?: boolean;
|
|
63
53
|
description?: string;
|
|
64
|
-
}) => Promise<
|
|
65
|
-
content: {
|
|
66
|
-
type: "text";
|
|
67
|
-
text: string;
|
|
68
|
-
}[];
|
|
69
|
-
}>;
|
|
54
|
+
}) => Promise<McpResponse>;
|
|
70
55
|
/**
|
|
71
56
|
* Creates handler for deprecateHook tool
|
|
72
57
|
*/
|
|
73
58
|
export declare function createDeprecateHookHandler(client: IOrchestratorApiClient): (args: {
|
|
74
59
|
id: string;
|
|
75
|
-
}) => Promise<
|
|
76
|
-
|
|
77
|
-
type: "text";
|
|
78
|
-
text: string;
|
|
79
|
-
}[];
|
|
80
|
-
}>;
|
|
60
|
+
}) => Promise<McpResponse>;
|
|
61
|
+
export {};
|
|
81
62
|
//# sourceMappingURL=hooks-handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/hooks-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/hooks-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AACD,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AAwBhG;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,CASjG;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,WAAW,CAAC,CAShD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,WAAW,CAAC,CASlD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IACR,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,KAAK,OAAO,CAAC,WAAW,CAAC,CAmBzB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,WAAW,CAAC,CAiBzF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,sBAAsB,GAC7B,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,WAAW,CAAC,CAShD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-handlers.js","sourceRoot":"","sources":["../../src/handlers/hooks-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks-handlers.js","sourceRoot":"","sources":["../../src/handlers/hooks-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQvD,4BAA4B;AAC5B,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EA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EAAE,EAAE,UAAU,CAAC,CAAC;YAC5D,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAA8B;IAE9B,OAAO,KAAK,EAAE,IAAoB,EAAwB,EAAE;QAC1D,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAotC5C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,GAAE,OAAe,GACvB,IAAI,CAON"}
|
package/dist/handlers/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { z } from 'zod';
|
|
|
11
11
|
// Workflow handlers
|
|
12
12
|
import { createDetectWorkflowHandler, createStartWorkflowHandler, createAdvancePhaseHandler, createGetStatusHandler, createGetWorkflowsHandler, createCompleteWorkflowHandler, createCreatePhaseHandler, } from './workflow-handlers.js';
|
|
13
13
|
// Gate handlers
|
|
14
|
-
import { createCreateCheckpointHandler, createValidateArtifactHandler
|
|
14
|
+
import { createCreateCheckpointHandler, createValidateArtifactHandler } from './gate-handlers.js';
|
|
15
15
|
// Pending action handlers
|
|
16
16
|
import { createGetNextActionHandler, createSetPendingActionHandler, createClearPendingActionHandler, createApproveActionHandler, } from './pending-action-handlers.js';
|
|
17
17
|
// Metrics handlers
|
|
@@ -25,7 +25,7 @@ import { createListTemplatesHandler, createGetTemplateByIdHandler, createCreateT
|
|
|
25
25
|
// Schema handlers
|
|
26
26
|
import { createListSchemasHandler, createGetSchemaHandler, createCreateSchemaHandler, createUpdateSchemaHandler, createDeleteSchemaHandler, } from './schemas-handlers.js';
|
|
27
27
|
// Pattern handlers
|
|
28
|
-
import { createListPatternsHandler, createGetPatternHandler
|
|
28
|
+
import { createListPatternsHandler, createGetPatternHandler } from './patterns-handlers.js';
|
|
29
29
|
// Checkpoint handlers
|
|
30
30
|
import { createListCheckpointsHandler, createGetCheckpointHandler, } from './checkpoints-handlers.js';
|
|
31
31
|
// WorkflowDefinition handlers
|
|
@@ -45,7 +45,7 @@ import { createAddKBRelationshipHandler, createGetRelatedDocumentsHandler, creat
|
|
|
45
45
|
// GraphRAG handlers
|
|
46
46
|
import { createSearchByEmbeddingHandler, createEnrichContextHandler, createFindMandatoryPatternsHandler, } from './graphrag-handlers.js';
|
|
47
47
|
// Stack Conventions handlers (RFC-026 Sprint 2)
|
|
48
|
-
import { createGetStackConventionsHandler
|
|
48
|
+
import { createGetStackConventionsHandler } from './stack-conventions-handlers.js';
|
|
49
49
|
import { createValidatePackFreshnessHandler } from './freshness-handlers.js';
|
|
50
50
|
/**
|
|
51
51
|
* Registers core tools (~59 tools) — workflow, context, gates, pending actions,
|
|
@@ -63,17 +63,40 @@ function registerCoreTools(server, client) {
|
|
|
63
63
|
server.registerTool('startWorkflow', {
|
|
64
64
|
description: 'Start a new workflow',
|
|
65
65
|
inputSchema: z.object({
|
|
66
|
-
type: z
|
|
66
|
+
type: z
|
|
67
|
+
.string()
|
|
68
|
+
.describe('Workflow type: feature_development, bug_fix, refactoring, emergency_debug, project_management_enterprise, or dynamic'),
|
|
67
69
|
prompt: z.string().describe('User prompt or feature description'),
|
|
68
|
-
title: z
|
|
69
|
-
|
|
70
|
+
title: z
|
|
71
|
+
.string()
|
|
72
|
+
.optional()
|
|
73
|
+
.describe('Human-readable title for the workflow (ADR-017 Phase 2)'),
|
|
74
|
+
executionMode: z
|
|
75
|
+
.string()
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Execution mode for dynamic workflows, e.g. "llm-driven" (ADR-017 Phase 2)'),
|
|
78
|
+
variant: z
|
|
79
|
+
.string()
|
|
80
|
+
.optional()
|
|
81
|
+
.describe('RFC-031 variant selector for the workflow type, e.g. "cirurgico" for ' +
|
|
82
|
+
'project_management_enterprise. Omit for default (full) execution.'),
|
|
83
|
+
inputs: z
|
|
84
|
+
.record(z.string(), z.unknown())
|
|
85
|
+
.optional()
|
|
86
|
+
.describe('RFC-031 required_inputs key-value map for the selected variant. ' +
|
|
87
|
+
'Keys and expected values depend on the variant definition. ' +
|
|
88
|
+
'Example for project_management_enterprise variant=cirurgico: ' +
|
|
89
|
+
'{ "framework": "<artifact_ref>", "scope": "<file_ref>" }.'),
|
|
70
90
|
}),
|
|
71
91
|
}, createStartWorkflowHandler(client));
|
|
72
92
|
server.registerTool('advancePhase', {
|
|
73
93
|
description: 'Advance workflow to next phase',
|
|
74
94
|
inputSchema: z.object({
|
|
75
95
|
workflowId: z.string().describe('Workflow ID'),
|
|
76
|
-
targetPhase: z
|
|
96
|
+
targetPhase: z
|
|
97
|
+
.string()
|
|
98
|
+
.optional()
|
|
99
|
+
.describe('Target phase name. Free-form workflow phase — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Workflow-type-specific; future phases accepted.'),
|
|
77
100
|
}),
|
|
78
101
|
}, createAdvancePhaseHandler(client));
|
|
79
102
|
server.registerTool('getStatus', {
|
|
@@ -111,24 +134,47 @@ function registerCoreTools(server, client) {
|
|
|
111
134
|
description: 'Set a pending action for workflow',
|
|
112
135
|
inputSchema: z.object({
|
|
113
136
|
workflowId: z.string().describe('Workflow ID'),
|
|
114
|
-
action: z
|
|
115
|
-
|
|
137
|
+
action: z
|
|
138
|
+
.object({
|
|
139
|
+
agent: z
|
|
140
|
+
.string()
|
|
141
|
+
.describe('Agent name (specifier, planner, task-generator, implementer, researcher, reviewer)'),
|
|
116
142
|
prompt: z.string().describe('Prompt/instructions for the agent'),
|
|
117
|
-
expectedOutput: z
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
143
|
+
expectedOutput: z
|
|
144
|
+
.object({
|
|
145
|
+
artifact: z
|
|
146
|
+
.string()
|
|
147
|
+
.describe('Artifact type (specification, plan, tasks, implementation-report)'),
|
|
148
|
+
phase: z
|
|
149
|
+
.string()
|
|
150
|
+
.describe('Workflow phase. Free-form — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Workflow-type-specific; future phases accepted.'),
|
|
151
|
+
contentType: z
|
|
152
|
+
.string()
|
|
153
|
+
.optional()
|
|
154
|
+
.default('markdown')
|
|
155
|
+
.describe('Content type (markdown, yaml, json)'),
|
|
156
|
+
})
|
|
157
|
+
.describe('Expected output configuration (REQUIRED)'),
|
|
158
|
+
inputArtifacts: z
|
|
159
|
+
.array(z.string())
|
|
160
|
+
.optional()
|
|
161
|
+
.describe('List of input artifact paths to provide as context'),
|
|
162
|
+
requiresApproval: z
|
|
163
|
+
.boolean()
|
|
164
|
+
.optional()
|
|
165
|
+
.describe('Whether action requires user approval before execution'),
|
|
166
|
+
})
|
|
167
|
+
.describe('Pending action details'),
|
|
125
168
|
}),
|
|
126
169
|
}, createSetPendingActionHandler(client));
|
|
127
170
|
server.registerTool('clearPendingAction', {
|
|
128
171
|
description: 'Clear pending action for workflow',
|
|
129
172
|
inputSchema: z.object({
|
|
130
173
|
workflowId: z.string().describe('Workflow ID'),
|
|
131
|
-
result: z
|
|
174
|
+
result: z
|
|
175
|
+
.record(z.string(), z.unknown())
|
|
176
|
+
.optional()
|
|
177
|
+
.describe('Optional result data from action completion'),
|
|
132
178
|
}),
|
|
133
179
|
}, createClearPendingActionHandler(client));
|
|
134
180
|
server.registerTool('approveAction', {
|
|
@@ -155,14 +201,18 @@ function registerCoreTools(server, client) {
|
|
|
155
201
|
description: 'Start tracking an agent invocation',
|
|
156
202
|
inputSchema: z.object({
|
|
157
203
|
agentName: z.string().describe('Name of the agent'),
|
|
158
|
-
phase: z
|
|
204
|
+
phase: z
|
|
205
|
+
.string()
|
|
206
|
+
.describe('Workflow phase. Free-form — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Workflow-type-specific; future phases accepted.'),
|
|
159
207
|
workflowId: z.string().optional().describe('Workflow ID (optional)'),
|
|
160
208
|
}),
|
|
161
209
|
}, createStartAgentInvocationHandler(client));
|
|
162
210
|
server.registerTool('completeAgentInvocation', {
|
|
163
211
|
description: 'Mark agent invocation as complete',
|
|
164
212
|
inputSchema: z.object({
|
|
165
|
-
invocationId: z
|
|
213
|
+
invocationId: z
|
|
214
|
+
.string()
|
|
215
|
+
.describe('Invocation ID. Free-form string — UUID is conventional but not required (e.g. `s199-step-b-auditor` is accepted for human-tagged invocations).'),
|
|
166
216
|
status: z.string().describe('Completion status (completed, failed, etc.)'),
|
|
167
217
|
summary: z.string().optional().describe('Optional summary of invocation result'),
|
|
168
218
|
}),
|
|
@@ -172,8 +222,14 @@ function registerCoreTools(server, client) {
|
|
|
172
222
|
description: 'Search the knowledge base',
|
|
173
223
|
inputSchema: z.object({
|
|
174
224
|
query: z.string().optional().describe('Search query string'),
|
|
175
|
-
tier: z
|
|
176
|
-
|
|
225
|
+
tier: z
|
|
226
|
+
.string()
|
|
227
|
+
.optional()
|
|
228
|
+
.describe('Filter by tier (critical, foundational, operational, reference)'),
|
|
229
|
+
category: z
|
|
230
|
+
.string()
|
|
231
|
+
.optional()
|
|
232
|
+
.describe('Filter by category (architecture, patterns, conventions, workflows, agents, governance)'),
|
|
177
233
|
tags: z.string().optional().describe('Comma-separated list of tags to filter by'),
|
|
178
234
|
limit: z.number().optional().describe('Maximum results to return'),
|
|
179
235
|
}),
|
|
@@ -241,7 +297,10 @@ function registerCoreTools(server, client) {
|
|
|
241
297
|
server.registerTool('listTemplates', {
|
|
242
298
|
description: 'List all templates, optionally filtered by type and domain',
|
|
243
299
|
inputSchema: z.object({
|
|
244
|
-
type: z
|
|
300
|
+
type: z
|
|
301
|
+
.string()
|
|
302
|
+
.optional()
|
|
303
|
+
.describe('Filter by template type (specification, plan, tasks, etc.)'),
|
|
245
304
|
domain: z.string().optional().describe('Filter by domain (orchestrator, workflow, etc.)'),
|
|
246
305
|
}),
|
|
247
306
|
}, createListTemplatesHandler(client));
|
|
@@ -267,7 +326,10 @@ function registerCoreTools(server, client) {
|
|
|
267
326
|
inputSchema: z.object({
|
|
268
327
|
id: z.string().describe('Template ID'),
|
|
269
328
|
content: z.string().optional().describe('Updated template content'),
|
|
270
|
-
variables: z
|
|
329
|
+
variables: z
|
|
330
|
+
.record(z.string(), z.unknown())
|
|
331
|
+
.optional()
|
|
332
|
+
.describe('Updated variables schema'),
|
|
271
333
|
}),
|
|
272
334
|
}, createUpdateTemplateHandler(client));
|
|
273
335
|
server.registerTool('deleteTemplate', {
|
|
@@ -293,7 +355,9 @@ function registerCoreTools(server, client) {
|
|
|
293
355
|
name: z.string().describe('Schema name'),
|
|
294
356
|
version: z.string().describe('Schema version (semver)'),
|
|
295
357
|
jsonSchema: z.record(z.string(), z.unknown()).describe('JSON Schema definition'),
|
|
296
|
-
targetArtifactType: z
|
|
358
|
+
targetArtifactType: z
|
|
359
|
+
.string()
|
|
360
|
+
.describe('Target artifact type (specification, plan, tasks, etc.)'),
|
|
297
361
|
description: z.string().optional().describe('Schema description'),
|
|
298
362
|
}),
|
|
299
363
|
}, createCreateSchemaHandler(client));
|
|
@@ -314,7 +378,10 @@ function registerCoreTools(server, client) {
|
|
|
314
378
|
server.registerTool('listPatterns', {
|
|
315
379
|
description: 'List all code patterns, optionally filtered by language and framework',
|
|
316
380
|
inputSchema: z.object({
|
|
317
|
-
language: z
|
|
381
|
+
language: z
|
|
382
|
+
.string()
|
|
383
|
+
.optional()
|
|
384
|
+
.describe('Filter by programming language (typescript, python, etc.)'),
|
|
318
385
|
framework: z.string().optional().describe('Filter by framework (express, fastify, etc.)'),
|
|
319
386
|
}),
|
|
320
387
|
}, createListPatternsHandler(client));
|
|
@@ -342,16 +409,26 @@ function registerCoreTools(server, client) {
|
|
|
342
409
|
description: 'Create a new workflow definition',
|
|
343
410
|
inputSchema: z.object({
|
|
344
411
|
name: z.string().describe('Workflow definition name'),
|
|
345
|
-
type: z
|
|
346
|
-
|
|
347
|
-
|
|
412
|
+
type: z
|
|
413
|
+
.string()
|
|
414
|
+
.describe('Workflow type (feature_development, bug_fix, refactoring, etc.)'),
|
|
415
|
+
phases: z
|
|
416
|
+
.array(z.string())
|
|
417
|
+
.describe('List of workflow phases. Free-form phase names — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Define any subset appropriate for the workflow type.'),
|
|
418
|
+
defaultConfig: z
|
|
419
|
+
.record(z.string(), z.unknown())
|
|
420
|
+
.optional()
|
|
421
|
+
.describe('Default configuration object'),
|
|
348
422
|
}),
|
|
349
423
|
}, createCreateWorkflowDefinitionHandler(client));
|
|
350
424
|
server.registerTool('updateWorkflowDefinition', {
|
|
351
425
|
description: 'Update an existing workflow definition',
|
|
352
426
|
inputSchema: z.object({
|
|
353
427
|
id: z.string().describe('Workflow definition ID'),
|
|
354
|
-
defaultConfig: z
|
|
428
|
+
defaultConfig: z
|
|
429
|
+
.record(z.string(), z.unknown())
|
|
430
|
+
.optional()
|
|
431
|
+
.describe('Updated default configuration'),
|
|
355
432
|
phases: z.array(z.string()).optional().describe('Updated phases list'),
|
|
356
433
|
}),
|
|
357
434
|
}, createUpdateWorkflowDefinitionHandler(client));
|
|
@@ -454,7 +531,10 @@ function registerCoreTools(server, client) {
|
|
|
454
531
|
inputSchema: z.object({
|
|
455
532
|
id: z.string().describe('Skill definition ID'),
|
|
456
533
|
description: z.string().optional().describe('Updated description'),
|
|
457
|
-
handler: z
|
|
534
|
+
handler: z
|
|
535
|
+
.record(z.string(), z.unknown())
|
|
536
|
+
.optional()
|
|
537
|
+
.describe('Updated handler configuration'),
|
|
458
538
|
}),
|
|
459
539
|
}, createUpdateSkillDefinitionHandler(client));
|
|
460
540
|
server.registerTool('deleteSkillDefinition', {
|
|
@@ -471,7 +551,10 @@ function registerCoreTools(server, client) {
|
|
|
471
551
|
title: z.string().describe('Document title'),
|
|
472
552
|
content: z.string().describe('Document content (markdown)'),
|
|
473
553
|
tier: z.string().describe('Document tier (critical, foundational, operational, reference)'),
|
|
474
|
-
category: z
|
|
554
|
+
category: z
|
|
555
|
+
.string()
|
|
556
|
+
.optional()
|
|
557
|
+
.describe('Document category (architecture, patterns, etc.)'),
|
|
475
558
|
tags: z.array(z.string()).optional().describe('Document tags'),
|
|
476
559
|
}),
|
|
477
560
|
}, createCreateKBDocumentHandler(client));
|
|
@@ -503,7 +586,10 @@ function registerExtendedTools(server, client) {
|
|
|
503
586
|
workflowId: z.string().describe('Workflow ID (must be a dynamic workflow)'),
|
|
504
587
|
name: z.string().describe('Phase name, e.g. "scan", "implement", "validate"'),
|
|
505
588
|
budgetUsd: z.number().optional().describe('Optional budget cap in USD for this phase'),
|
|
506
|
-
metadata: z
|
|
589
|
+
metadata: z
|
|
590
|
+
.record(z.string(), z.unknown())
|
|
591
|
+
.optional()
|
|
592
|
+
.describe('Optional metadata for the phase'),
|
|
507
593
|
}),
|
|
508
594
|
}, createCreatePhaseHandler(client));
|
|
509
595
|
server.registerTool('completeWorkflow', {
|
|
@@ -517,7 +603,9 @@ function registerExtendedTools(server, client) {
|
|
|
517
603
|
description: 'Store artifact content for a workflow phase',
|
|
518
604
|
inputSchema: z.object({
|
|
519
605
|
workflowId: z.string().describe('Workflow ID'),
|
|
520
|
-
phase: z
|
|
606
|
+
phase: z
|
|
607
|
+
.string()
|
|
608
|
+
.describe('Workflow phase. Free-form — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Workflow-type-specific; future phases accepted.'),
|
|
521
609
|
content: z.string().describe('Artifact content'),
|
|
522
610
|
type: z.string().describe('Artifact type (specification, plan, tasks, etc.)'),
|
|
523
611
|
contentType: z.string().optional().describe('Content MIME type (default: text/markdown)'),
|
|
@@ -551,9 +639,13 @@ function registerExtendedTools(server, client) {
|
|
|
551
639
|
description: 'Correct artifact content for a past phase (admin-only, bypasses phase gate). Requires correctionReason for audit trail.',
|
|
552
640
|
inputSchema: z.object({
|
|
553
641
|
workflowId: z.string().describe('Workflow ID'),
|
|
554
|
-
phase: z
|
|
642
|
+
phase: z
|
|
643
|
+
.string()
|
|
644
|
+
.describe('Workflow phase to correct. Free-form — examples: discovery, research, specify, plan, tasks, framework, operational, implement, deliver, review, validation, calibration, governance. Workflow-type-specific; future phases accepted.'),
|
|
555
645
|
content: z.string().describe('Corrected artifact content'),
|
|
556
|
-
type: z
|
|
646
|
+
type: z
|
|
647
|
+
.string()
|
|
648
|
+
.describe('Artifact type (specification, plan, tasks, implementation-report)'),
|
|
557
649
|
correctionReason: z.string().describe('Reason for correction (required for audit trail)'),
|
|
558
650
|
contentType: z.string().optional().describe('Content MIME type (default: text/markdown)'),
|
|
559
651
|
metadata: z.record(z.string(), z.unknown()).optional().describe('Additional metadata'),
|
|
@@ -614,16 +706,26 @@ function registerExtendedTools(server, client) {
|
|
|
614
706
|
server.registerTool('getStackConventions', {
|
|
615
707
|
description: 'Get detailed stack conventions for the current project from the Vault KB. Use when baseline context is insufficient — e.g. when you need framework-specific patterns for testing, routing, or error handling.',
|
|
616
708
|
inputSchema: z.object({
|
|
617
|
-
pack: z
|
|
618
|
-
|
|
709
|
+
pack: z
|
|
710
|
+
.string()
|
|
711
|
+
.describe('Convention pack ID (from PatternSet conventions_pack field, e.g. "node-bun-typescript")'),
|
|
712
|
+
topic: z
|
|
713
|
+
.string()
|
|
714
|
+
.optional()
|
|
715
|
+
.describe('Filter by topic (e.g. "testing", "error-handling", "file-structure"). Omit for all conventions.'),
|
|
619
716
|
}),
|
|
620
717
|
}, createGetStackConventionsHandler(client));
|
|
621
718
|
// Pack Freshness Validation Tool (RFC-026 Sprint 5)
|
|
622
719
|
server.registerTool('validatePackFreshness', {
|
|
623
720
|
description: 'Validate convention pack content against official documentation via Context7 + semantic comparison. Returns per-section freshness status (fresh/stale/unknown) with confidence scores.',
|
|
624
721
|
inputSchema: z.object({
|
|
625
|
-
pack: z
|
|
626
|
-
|
|
722
|
+
pack: z
|
|
723
|
+
.string()
|
|
724
|
+
.describe('Convention pack ID (e.g. "react-native-expo", "node-bun-typescript")'),
|
|
725
|
+
sections: z
|
|
726
|
+
.array(z.string())
|
|
727
|
+
.optional()
|
|
728
|
+
.describe('Specific sections to validate (e.g. ["Expo Router", "Testing"]). Omit for all sections.'),
|
|
627
729
|
}),
|
|
628
730
|
}, createValidatePackFreshnessHandler(client));
|
|
629
731
|
}
|