@tomflow/chatloop-tools 0.9.37 → 0.9.38
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.
|
@@ -96,12 +96,14 @@ export async function verifyMcpTools(p,ports={}){
|
|
|
96
96
|
if(!names.includes(name))throw Object.assign(Error('MCP_PROBE_REQUIRED_TOOL_MISSING'),{
|
|
97
97
|
code:'MCP_PROBE_REQUIRED_TOOL_MISSING'});
|
|
98
98
|
const resources=await request('resources/list');
|
|
99
|
-
const
|
|
99
|
+
const current=listed.result?.tools?.find(x=>x.name==='chat_loop_form__prepare');
|
|
100
|
+
const advertised=current?._meta?.ui?.resourceUri;
|
|
101
|
+
const uri=resources.result?.resources?.find(x=>x.uri===advertised)?.uri;
|
|
100
102
|
if(!uri)throw Object.assign(Error('MCP_PROBE_FORM_RESOURCE_MISSING'),{
|
|
101
103
|
code:'MCP_PROBE_FORM_RESOURCE_MISSING'});
|
|
102
104
|
const view=await request('resources/read',{uri});
|
|
103
105
|
const html=view.result?.contents?.[0]?.text||'';
|
|
104
|
-
if(!html.includes('chat_loop_form__render'))
|
|
106
|
+
if(!html.includes('chat_loop_form__render')||!html.includes('ui/message'))
|
|
105
107
|
throw Object.assign(Error('MCP_PROBE_FORM_APP_OUTDATED'),{
|
|
106
108
|
code:'MCP_PROBE_FORM_APP_OUTDATED'});
|
|
107
109
|
return {ok:true,toolCount:names.length,formResource:uri};
|
package/package.json
CHANGED
package/providers/form.mjs
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import {randomUUID} from 'node:crypto';
|
|
3
3
|
import {readFileSync} from 'node:fs';
|
|
4
4
|
|
|
5
|
-
const RESOURCE_URI='ui://chat-loop/form/
|
|
6
|
-
const LEGACY_RESOURCE_URIS=['ui://chat-loop/form/
|
|
5
|
+
const RESOURCE_URI='ui://chat-loop/form/v7';
|
|
6
|
+
const LEGACY_RESOURCE_URIS=['ui://chat-loop/form/v6',
|
|
7
|
+
'ui://chat-loop/form/v5','ui://chat-loop/form/v4',
|
|
7
8
|
'ui://chat-loop/form/v3',
|
|
8
9
|
'ui://chat-loop/form/review-v2','ui://chat-loop/form/review-v1'];
|
|
9
10
|
const RESOURCE_MIME='text/html;profile=mcp-app';
|