@aborruso/ckan-mcp-server 0.4.43 → 0.4.45
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/LOG.md +16 -0
- package/dist/index.js +22 -2
- package/dist/worker.js +25 -7
- package/package.json +1 -1
package/LOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# LOG
|
|
2
2
|
|
|
3
|
+
## 2026-02-23 (v0.4.45)
|
|
4
|
+
|
|
5
|
+
- Fix MCP Apps: add timeout fallback to SEP-1865 handshake
|
|
6
|
+
- If host doesn't respond to `ui/initialize` within 1.5s, send `initialized` anyway
|
|
7
|
+
- Handles hosts with partial spec support without blocking the widget forever
|
|
8
|
+
- Fixed in both `src/ui/datastore-table.html` and inlined HTML in `src/resources/datastore-table-ui.ts`
|
|
9
|
+
|
|
10
|
+
## 2026-02-23 (v0.4.44)
|
|
11
|
+
|
|
12
|
+
- Fix MCP Apps: implement mandatory SEP-1865 handshake in DataStore Table Viewer HTML
|
|
13
|
+
- Widget now sends `ui/initialize` request to host on load
|
|
14
|
+
- After host response, sends `ui/notifications/initialized`
|
|
15
|
+
- Without this handshake, compliant hosts (MCPJam, Goose, etc.) never send `tool-result`
|
|
16
|
+
- Fixed in both `src/ui/datastore-table.html` and inlined HTML in `src/resources/datastore-table-ui.ts`
|
|
17
|
+
- Confirmed working in MCPJam (interactive table renders correctly)
|
|
18
|
+
|
|
3
19
|
## 2026-02-22 (v0.4.43)
|
|
4
20
|
|
|
5
21
|
- Fix MCP Apps message listener to use correct JSON-RPC method per ext-apps spec:
|
package/dist/index.js
CHANGED
|
@@ -7184,15 +7184,35 @@ var DATASTORE_TABLE_HTML = `<!DOCTYPE html>
|
|
|
7184
7184
|
currentPage=1; sortCol=null; sortDir=1; filterText='';
|
|
7185
7185
|
render();
|
|
7186
7186
|
}
|
|
7187
|
+
// SEP-1865 handshake: host won't send tool-result until initialized
|
|
7188
|
+
var _pending={};var _nid=1;
|
|
7189
|
+
function mcpReq(method,params){
|
|
7190
|
+
var id=_nid++;
|
|
7191
|
+
return new Promise(function(res,rej){
|
|
7192
|
+
_pending[id]={resolve:res,reject:rej};
|
|
7193
|
+
window.parent.postMessage({jsonrpc:'2.0',id:id,method:method,params:params||{}},'*');
|
|
7194
|
+
});
|
|
7195
|
+
}
|
|
7196
|
+
function mcpNot(method,params){
|
|
7197
|
+
window.parent.postMessage({jsonrpc:'2.0',method:method,params:params||{}},'*');
|
|
7198
|
+
}
|
|
7199
|
+
var _inited=false;
|
|
7200
|
+
function sendInited(){if(_inited)return;_inited=true;mcpNot('ui/notifications/initialized');}
|
|
7201
|
+
setTimeout(sendInited,1500);
|
|
7202
|
+
mcpReq('ui/initialize',{protocolVersion:'2026-01-26',appCapabilities:{},appInfo:{name:'ckan-datastore-table',version:'1.0.0'}})
|
|
7203
|
+
.then(sendInited).catch(sendInited);
|
|
7187
7204
|
window.addEventListener('message',function(event){
|
|
7188
7205
|
var msg=event.data;
|
|
7189
7206
|
if(!msg||typeof msg!=='object') return;
|
|
7190
|
-
|
|
7207
|
+
if(msg.id!==undefined&&_pending[msg.id]){
|
|
7208
|
+
var r=_pending[msg.id];delete _pending[msg.id];
|
|
7209
|
+
if(msg.error)r.reject(new Error(JSON.stringify(msg.error)));else r.resolve(msg.result);
|
|
7210
|
+
return;
|
|
7211
|
+
}
|
|
7191
7212
|
var data=null;
|
|
7192
7213
|
if(msg.method==='ui/notifications/tool-result'&&msg.params&&msg.params.structuredContent){
|
|
7193
7214
|
data=msg.params.structuredContent;
|
|
7194
7215
|
}
|
|
7195
|
-
// fallbacks for older/alternative shapes
|
|
7196
7216
|
if(!data) data=
|
|
7197
7217
|
(msg.method==='ui/toolResult'&&msg.params&&msg.params.result&&msg.params.result.structuredContent)||
|
|
7198
7218
|
msg.structuredContent||
|