@jini-ai/mcp 0.6.17 → 0.6.22

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/bin/serve.js +12 -81
  3. package/dist/core/config.js +3 -1
  4. package/dist/core/tokens.js +3 -1
  5. package/dist/federation/bootstrap.d.ts +6 -5
  6. package/dist/federation/bootstrap.js +25 -6
  7. package/dist/federation/frozen-grants.d.ts +37 -0
  8. package/dist/federation/frozen-grants.js +67 -0
  9. package/dist/federation/registrations.d.ts +4 -1
  10. package/dist/federation/registrations.js +1 -1
  11. package/dist/federation/reload.d.ts +13 -6
  12. package/dist/federation/reload.js +35 -12
  13. package/dist/index.d.ts +5 -2
  14. package/dist/index.js +3 -1
  15. package/dist/server/daemon-client.d.ts +2 -2
  16. package/dist/server/daemon-client.js +4 -1
  17. package/dist/server/http-tool-server.d.ts +44 -0
  18. package/dist/server/http-tool-server.js +272 -0
  19. package/dist/server/index.d.ts +2 -0
  20. package/dist/server/index.js +2 -0
  21. package/dist/server/run-tool-host.d.ts +28 -0
  22. package/dist/server/run-tool-host.js +103 -0
  23. package/dist/server/sdk-transport.d.ts +7 -1
  24. package/dist/server/tool-arguments.d.ts +29 -10
  25. package/dist/server/tool-arguments.js +66 -15
  26. package/dist/server/tool-protocol.js +39 -9
  27. package/dist/server/tool-result-pages.d.ts +21 -0
  28. package/dist/server/tool-result-pages.js +74 -0
  29. package/dist/server/tool-server.d.ts +11 -5
  30. package/dist/server/tool-server.js +78 -53
  31. package/dist/server/tools/delegated-tool.d.ts +7 -6
  32. package/dist/server/tools/delegated-tool.js +8 -3
  33. package/dist/server/tools/wait.d.ts +5 -0
  34. package/dist/server/tools/wait.js +17 -0
  35. package/package.json +7 -7
@@ -0,0 +1,17 @@
1
+ import { setTimeout } from 'node:timers/promises';
2
+ /** A bounded, cancellable pause shared by all MCP clients; no daemon call or shell process.
3
+ * Long poll intervals use several calls, allowing the agent to check messages between waits. */
4
+ export const waitTool = {
5
+ name: 'wait_for',
6
+ description: 'Wait before polling a pending background job again. Pass seconds from poll_after_seconds, up to 60 per call; repeat for longer intervals. Returns waitedSeconds after the pause. Cancellation stops the timer. Use this instead of Bash or shell sleep. This tool does not check job status.',
7
+ inputSchema: { type: 'object', required: ['seconds'], additionalProperties: false,
8
+ properties: { seconds: { type: 'number', minimum: 0, maximum: 60 } } },
9
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
10
+ async handler({ args, ctx }) {
11
+ // handleToolCall validates the duration before this handler is reached.
12
+ const seconds = args['seconds'];
13
+ await setTimeout(seconds * 1000, undefined, { signal: ctx.signal });
14
+ return { waitedSeconds: seconds };
15
+ },
16
+ };
17
+ //# sourceMappingURL=wait.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/mcp",
3
- "version": "0.6.17",
3
+ "version": "0.6.22",
4
4
  "description": "Model Context Protocol adapters: server config schema and IO, an MCP client, and agent-side MCP server installation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -85,16 +85,16 @@
85
85
  "dependencies": {
86
86
  "@cfworker/json-schema": "^4.1.1",
87
87
  "@modelcontextprotocol/sdk": "^1.29.0",
88
- "@jini-ai/platform": "^0.6.17",
89
- "@jini-ai/core": "^0.6.17",
90
- "@jini-ai/protocol": "^0.6.17"
88
+ "@jini-ai/protocol": "^0.6.19",
89
+ "@jini-ai/platform": "^0.6.22",
90
+ "@jini-ai/core": "^0.6.22"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@cfworker/json-schema": "^4.1.1",
94
94
  "@modelcontextprotocol/sdk": "^1.29.0",
95
- "@jini-ai/core": "^0.6.17",
96
- "@jini-ai/platform": "^0.6.17",
97
- "@jini-ai/daemon": "^0.6.17"
95
+ "@jini-ai/core": "^0.6.22",
96
+ "@jini-ai/daemon": "^0.6.22",
97
+ "@jini-ai/platform": "^0.6.22"
98
98
  },
99
99
  "scripts": {
100
100
  "build": "tsc -p tsconfig.json && chmod +x dist/bin/serve.js",