@pipeshub-ai/mcp 2.0.0 → 2.1.0

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 (80) hide show
  1. package/bin/mcp-server.js +719 -100
  2. package/bin/mcp-server.js.map +20 -13
  3. package/esm/funcs/agentsListAgents.d.ts +10 -0
  4. package/esm/funcs/agentsListAgents.d.ts.map +1 -0
  5. package/esm/funcs/agentsListAgents.js +83 -0
  6. package/esm/funcs/agentsListAgents.js.map +1 -0
  7. package/esm/funcs/agentsStreamConversation.d.ts +10 -0
  8. package/esm/funcs/agentsStreamConversation.d.ts.map +1 -0
  9. package/esm/funcs/agentsStreamConversation.js +83 -0
  10. package/esm/funcs/agentsStreamConversation.js.map +1 -0
  11. package/esm/funcs/agentsStreamMessage.d.ts +10 -0
  12. package/esm/funcs/agentsStreamMessage.d.ts.map +1 -0
  13. package/esm/funcs/agentsStreamMessage.js +86 -0
  14. package/esm/funcs/agentsStreamMessage.js.map +1 -0
  15. package/esm/funcs/conversationsStreamConversation.d.ts.map +1 -1
  16. package/esm/funcs/conversationsStreamConversation.js +1 -3
  17. package/esm/funcs/conversationsStreamConversation.js.map +1 -1
  18. package/esm/funcs/conversationsStreamMessage.d.ts.map +1 -1
  19. package/esm/funcs/conversationsStreamMessage.js +0 -7
  20. package/esm/funcs/conversationsStreamMessage.js.map +1 -1
  21. package/esm/mcp-server/instructions.d.ts +2 -0
  22. package/esm/mcp-server/instructions.d.ts.map +1 -0
  23. package/esm/mcp-server/instructions.js +83 -0
  24. package/esm/mcp-server/instructions.js.map +1 -0
  25. package/esm/mcp-server/prompts/pipeshubAssistant.d.ts +8 -0
  26. package/esm/mcp-server/prompts/pipeshubAssistant.d.ts.map +1 -0
  27. package/esm/mcp-server/prompts/pipeshubAssistant.js +31 -0
  28. package/esm/mcp-server/prompts/pipeshubAssistant.js.map +1 -0
  29. package/esm/mcp-server/server.d.ts.map +1 -1
  30. package/esm/mcp-server/server.js +7 -60
  31. package/esm/mcp-server/server.js.map +1 -1
  32. package/esm/mcp-server/tools/_helpers.d.ts +78 -0
  33. package/esm/mcp-server/tools/_helpers.d.ts.map +1 -1
  34. package/esm/mcp-server/tools/_helpers.js +155 -1
  35. package/esm/mcp-server/tools/_helpers.js.map +1 -1
  36. package/esm/mcp-server/tools/pipeshubAgents.d.ts +8 -0
  37. package/esm/mcp-server/tools/pipeshubAgents.d.ts.map +1 -0
  38. package/esm/mcp-server/tools/pipeshubAgents.js +62 -0
  39. package/esm/mcp-server/tools/pipeshubAgents.js.map +1 -0
  40. package/esm/mcp-server/tools/pipeshubChat.d.ts +6 -1
  41. package/esm/mcp-server/tools/pipeshubChat.d.ts.map +1 -1
  42. package/esm/mcp-server/tools/pipeshubChat.js +88 -26
  43. package/esm/mcp-server/tools/pipeshubChat.js.map +1 -1
  44. package/esm/mcp-server/tools/pipeshubDirectory.d.ts.map +1 -1
  45. package/esm/mcp-server/tools/pipeshubDirectory.js +0 -1
  46. package/esm/mcp-server/tools/pipeshubDirectory.js.map +1 -1
  47. package/esm/mcp-server/tools/pipeshubDownloadRecord.d.ts.map +1 -1
  48. package/esm/mcp-server/tools/pipeshubDownloadRecord.js +0 -3
  49. package/esm/mcp-server/tools/pipeshubDownloadRecord.js.map +1 -1
  50. package/esm/mcp-server/tools/pipeshubSearch.d.ts.map +1 -1
  51. package/esm/mcp-server/tools/pipeshubSearch.js +0 -3
  52. package/esm/mcp-server/tools/pipeshubSearch.js.map +1 -1
  53. package/esm/mcp-server/tools/pipeshubSources.d.ts.map +1 -1
  54. package/esm/mcp-server/tools/pipeshubSources.js +0 -4
  55. package/esm/mcp-server/tools/pipeshubSources.js.map +1 -1
  56. package/esm/models/agentops.d.ts +119 -0
  57. package/esm/models/agentops.d.ts.map +1 -0
  58. package/esm/models/agentops.js +97 -0
  59. package/esm/models/agentops.js.map +1 -0
  60. package/esm/tool-names.d.ts.map +1 -1
  61. package/esm/tool-names.js +5 -1
  62. package/esm/tool-names.js.map +1 -1
  63. package/package.json +2 -2
  64. package/src/funcs/agentsListAgents.ts +141 -0
  65. package/src/funcs/agentsStreamConversation.ts +144 -0
  66. package/src/funcs/agentsStreamMessage.ts +147 -0
  67. package/src/funcs/conversationsStreamConversation.ts +1 -3
  68. package/src/funcs/conversationsStreamMessage.ts +0 -8
  69. package/src/mcp-server/instructions.ts +83 -0
  70. package/src/mcp-server/prompts/pipeshubAssistant.ts +37 -0
  71. package/src/mcp-server/server.ts +8 -62
  72. package/src/mcp-server/tools/_helpers.ts +216 -1
  73. package/src/mcp-server/tools/pipeshubAgents.ts +68 -0
  74. package/src/mcp-server/tools/pipeshubChat.ts +87 -26
  75. package/src/mcp-server/tools/pipeshubDirectory.ts +0 -1
  76. package/src/mcp-server/tools/pipeshubDownloadRecord.ts +0 -4
  77. package/src/mcp-server/tools/pipeshubSearch.ts +0 -3
  78. package/src/mcp-server/tools/pipeshubSources.ts +0 -5
  79. package/src/models/agentops.ts +160 -0
  80. package/src/tool-names.ts +5 -1
package/src/tool-names.ts CHANGED
@@ -6,7 +6,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
6
6
  },
7
7
  {
8
8
  "name": "pipeshub_chat",
9
- "description": "**Default tool for anything PipesHub-related.** Use this whenever the\nuser asks about their documents, files, knowledge base, company\npolicies, or anything that could plausibly be answered by content in\ntheir PipesHub-indexed sources (Drive, Box, Confluence, Slack, Gmail,\nJira, the org's KB, ...). Do NOT answer those from your own knowledge —\n`pipeshub_chat` grounds the answer in the user's actual data and\nreturns citations.\n\n**When to pick this over other tools:**\n- \"What does <document> say about X?\" → `pipeshub_chat` (NOT search;\n search is only for locating files by name).\n- \"Summarize <topic / doc>.\" → `pipeshub_chat`.\n- \"What's our policy on Y?\" → `pipeshub_chat`.\n- \"What do we know about Z?\" → `pipeshub_chat`.\n- \"Find / locate the file named X\" → `pipeshub_search` (then\n `pipeshub_download_record` if the user wants the bytes).\n\n**Conversation lifecycle** — one tool, both start and continue:\n\n- **First turn**: omit `conversationId`. The server creates a new\n conversation; capture `conversationId` from the response.\n- **Follow-up turn**: pass the `conversationId` from the previous\n response. Server-side context is preserved — do NOT replay earlier\n messages, and `filters` is ignored on follow-ups (set once at\n creation).\n\nOnly re-omit `conversationId` (start a fresh conversation) when the\nuser explicitly asks to start over / clear context.\n\nThe response contains the AI's `answer` plus `citations`. To download a\ncited document, take `citations[*].recordId` and call\n`pipeshub_download_record`."
9
+ "description": "**Primary chat tool handles both internal knowledge queries and web search.**\n\n**Internal search** (default, `chatMode: \"internal_search\"`): Use whenever\nthe user asks about their documents, files, knowledge base, company policies,\nor anything that could plausibly be answered by content in their PipesHub-indexed\nsources (Drive, Box, Confluence, Slack, Gmail, Jira, the org's KB, ...).\nGrounds the answer in the user's actual data and returns citations.\n\n**Web search** (`chatMode: \"web_search\"`): Use when the user asks about\ncurrent events, public information, or anything unlikely to be in the org's\ninternal knowledge base. Pass `chatMode: \"web_search\"` and this tool will\nsearch the public web instead.\n\n**When to pick this over other tools:**\n- \"What does <document> say about X?\" → `pipeshub_chat` (internal_search)\n- \"Summarize <topic / doc>.\" → `pipeshub_chat` (internal_search)\n- \"What's our policy on Y?\" → `pipeshub_chat` (internal_search)\n- \"What's in the news about Z?\" → `pipeshub_chat` (web_search)\n- \"What is the latest version of <library>?\" → `pipeshub_chat` (web_search)\n- \"Find / locate the file named X\" → `pipeshub_search` (then\n `pipeshub_download_record` if the user wants the bytes).\n\n**Conversation lifecycle** — one tool, both start and continue:\n\n- **First turn**: omit `conversationId`. The server creates a new\n conversation; capture `conversationId` from the response.\n- **Follow-up turn**: pass the `conversationId` from the previous\n response. Server-side context is preserved — do NOT replay earlier\n messages, and `filters` is ignored on follow-ups (set once at\n creation).\n\nOnly re-omit `conversationId` (start a fresh conversation) when the\nuser explicitly asks to start over / clear context.\n\nThe response contains the AI's `answer` plus `citations`. To download a\ncited document, take `citations[*].recordId` and call\n`pipeshub_download_record`."
10
10
  },
11
11
  {
12
12
  "name": "pipeshub_search",
@@ -19,5 +19,9 @@ export const toolNames: Array<{ name: string; description: string }>= [
19
19
  {
20
20
  "name": "pipeshub_directory",
21
21
  "description": "Look up people, groups, and teams in PipesHub. One tool with five\nactions — pick the right `action`:\n\n- `whoami` — who is the caller? Use this whenever you need the\n authenticated user's own id, email, or full name (e.g. before\n `get_user` on themselves).\n- `list_users` — search / page through org users.\n- `get_user` — full `User` document for one user (requires `userId`).\n- `list_groups` — list user groups with `userCount`.\n- `list_my_teams` — teams the caller belongs to, with capability flags\n (`canEdit` / `canDelete` / `canManageMembers`).\n\nOutput shape varies by action; see each action's docs above."
22
+ },
23
+ {
24
+ "name": "pipeshub_agents",
25
+ "description": "List the PipesHub **agents** configured for this org, each with its\ncapabilities.\n\nAgents are specialized assistants (custom system prompt, tools, knowledge\nscope). To converse with one, take its `agentId` and pass it to\n`pipeshub_chat`'s `agentId` argument.\n\nEach agent is returned as:\n`{ agentId, name, description, systemPrompt, startMessage, tags, webSearch,\nisActive, toolsets, knowledge }`.\n- `toolsets` — what the agent can DO: each `{ name, tools }` where `name`\n is the connector (e.g. `jira`, `gmail`) and `tools` are the runnable\n tool ids (e.g. `jira.create_issue`, `gmail.send_email`).\n- `knowledge` — what the agent can READ: each `{ name, type }` (e.g.\n `Confluence-2` / `Confluence`).\n\n**Route on `toolsets`/`knowledge`, not the name** — names and descriptions\nare often generic or misleading. Match the request to the agent whose tools can\nactually perform it (e.g. \"create a Jira ticket\" → the agent whose toolset is\n`jira` and whose tools include `jira.create_issue`). If NO agent has a tool\nfor the requested action, say so — don't force an unrelated agent.\n\nThe list **may be empty** (no agents configured). For plain Q&A when no\nspecific agent is needed, use `pipeshub_chat` WITHOUT `agentId` and pick a\n`chatMode`: `internal_search` (org's indexed knowledge) or `web_search`\n(live web). Use `agentId` everywhere an agent is referenced."
22
26
  }
23
27
  ];