@tomflow/chatloop-tools 0.9.42 → 0.9.43

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.9.42",
6
+ "version": "0.9.43",
7
7
  "type": "module",
8
8
  "description": "Chat Loop local tools: MCP gateway, isolated bundled tunnel-client and unified CLI",
9
9
  "bin": {
@@ -2,8 +2,8 @@
2
2
  import {createHash,randomUUID} from 'node:crypto';
3
3
  import {readFileSync} from 'node:fs';
4
4
 
5
- const URI='ui://chat-loop/document/v2';
6
- const LEGACY_URI='ui://chat-loop/document/v1';
5
+ const URI='ui://chat-loop/document/v3';
6
+ const LEGACY_URIS=['ui://chat-loop/document/v2','ui://chat-loop/document/v1'];
7
7
  const MIME='text/html;profile=mcp-app';
8
8
  const IDENT=/^[A-Za-z0-9][A-Za-z0-9_.-]{7,127}$/;
9
9
  const UUID=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
@@ -76,11 +76,11 @@ export const provider=Object.freeze({
76
76
  create(){
77
77
  return Object.freeze({
78
78
  tools:()=>tools,
79
- resources:()=>[URI,LEGACY_URI].map(uri=>({uri,name:'Chat Loop Document',
79
+ resources:()=>[URI,...LEGACY_URIS].map(uri=>({uri,name:'Chat Loop Document',
80
80
  description:'Generic rich document reader with one-click copy',
81
81
  mimeType:MIME})),
82
82
  async readResource(uri){
83
- if(uri!==URI&&uri!==LEGACY_URI)throw err('MCP_RESOURCE_NOT_FOUND');
83
+ if(uri!==URI&&!LEGACY_URIS.includes(uri))throw err('MCP_RESOURCE_NOT_FOUND');
84
84
  return {contents:[{uri,mimeType:MIME,
85
85
  text:readFileSync(new URL('../ui/document/view.html',import.meta.url),'utf8'),
86
86
  _meta:{ui:{availableDisplayModes:['inline'],