@nex-ai/nex 0.1.65 → 0.2.1
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/README.md +190 -263
- package/bin/nex-mcp.js +50 -0
- package/bin/nex.js +53 -0
- package/package.json +15 -36
- package/dist/agent/adoption.d.ts +0 -23
- package/dist/agent/adoption.js +0 -87
- package/dist/agent/adoption.js.map +0 -1
- package/dist/agent/gossip.d.ts +0 -17
- package/dist/agent/gossip.js +0 -48
- package/dist/agent/gossip.js.map +0 -1
- package/dist/agent/loop.d.ts +0 -59
- package/dist/agent/loop.js +0 -389
- package/dist/agent/loop.js.map +0 -1
- package/dist/agent/queues.d.ts +0 -16
- package/dist/agent/queues.js +0 -44
- package/dist/agent/queues.js.map +0 -1
- package/dist/agent/session-store.d.ts +0 -21
- package/dist/agent/session-store.js +0 -96
- package/dist/agent/session-store.js.map +0 -1
- package/dist/agent/templates.d.ts +0 -5
- package/dist/agent/templates.js +0 -55
- package/dist/agent/templates.js.map +0 -1
- package/dist/agent/tools.d.ts +0 -25
- package/dist/agent/tools.js +0 -238
- package/dist/agent/tools.js.map +0 -1
- package/dist/agent/types.d.ts +0 -59
- package/dist/agent/types.js +0 -5
- package/dist/agent/types.js.map +0 -1
- package/dist/calendar/scheduler.d.ts +0 -32
- package/dist/calendar/scheduler.js +0 -178
- package/dist/calendar/scheduler.js.map +0 -1
- package/dist/calendar/store.d.ts +0 -15
- package/dist/calendar/store.js +0 -50
- package/dist/calendar/store.js.map +0 -1
- package/dist/calendar/types.d.ts +0 -17
- package/dist/calendar/types.js +0 -5
- package/dist/calendar/types.js.map +0 -1
- package/dist/chat/channel.d.ts +0 -20
- package/dist/chat/channel.js +0 -84
- package/dist/chat/channel.js.map +0 -1
- package/dist/chat/message-store.d.ts +0 -18
- package/dist/chat/message-store.js +0 -82
- package/dist/chat/message-store.js.map +0 -1
- package/dist/chat/router.d.ts +0 -17
- package/dist/chat/router.js +0 -65
- package/dist/chat/router.js.map +0 -1
- package/dist/chat/suggested-responses.d.ts +0 -6
- package/dist/chat/suggested-responses.js +0 -99
- package/dist/chat/suggested-responses.js.map +0 -1
- package/dist/chat/types.d.ts +0 -28
- package/dist/chat/types.js +0 -5
- package/dist/chat/types.js.map +0 -1
- package/dist/cli.d.ts +0 -5
- package/dist/cli.js +0 -20
- package/dist/cli.js.map +0 -1
- package/dist/commands/attribute.d.ts +0 -4
- package/dist/commands/attribute.js +0 -75
- package/dist/commands/attribute.js.map +0 -1
- package/dist/commands/config-cmd.d.ts +0 -4
- package/dist/commands/config-cmd.js +0 -53
- package/dist/commands/config-cmd.js.map +0 -1
- package/dist/commands/context.d.ts +0 -4
- package/dist/commands/context.js +0 -167
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/dispatch.d.ts +0 -44
- package/dist/commands/dispatch.js +0 -1544
- package/dist/commands/dispatch.js.map +0 -1
- package/dist/commands/graph.d.ts +0 -5
- package/dist/commands/graph.js +0 -77
- package/dist/commands/graph.js.map +0 -1
- package/dist/commands/init.d.ts +0 -49
- package/dist/commands/init.js +0 -319
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/insight.d.ts +0 -4
- package/dist/commands/insight.js +0 -39
- package/dist/commands/insight.js.map +0 -1
- package/dist/commands/integrate.d.ts +0 -4
- package/dist/commands/integrate.js +0 -361
- package/dist/commands/integrate.js.map +0 -1
- package/dist/commands/list-job.d.ts +0 -4
- package/dist/commands/list-job.js +0 -41
- package/dist/commands/list-job.js.map +0 -1
- package/dist/commands/list.d.ts +0 -4
- package/dist/commands/list.js +0 -148
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/note.d.ts +0 -4
- package/dist/commands/note.js +0 -77
- package/dist/commands/note.js.map +0 -1
- package/dist/commands/object.d.ts +0 -4
- package/dist/commands/object.js +0 -78
- package/dist/commands/object.js.map +0 -1
- package/dist/commands/parse-input.d.ts +0 -5
- package/dist/commands/parse-input.js +0 -37
- package/dist/commands/parse-input.js.map +0 -1
- package/dist/commands/record.d.ts +0 -4
- package/dist/commands/record.js +0 -126
- package/dist/commands/record.js.map +0 -1
- package/dist/commands/register.d.ts +0 -4
- package/dist/commands/register.js +0 -23
- package/dist/commands/register.js.map +0 -1
- package/dist/commands/relationship.d.ts +0 -4
- package/dist/commands/relationship.js +0 -80
- package/dist/commands/relationship.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -4
- package/dist/commands/scan.js +0 -111
- package/dist/commands/scan.js.map +0 -1
- package/dist/commands/search.d.ts +0 -4
- package/dist/commands/search.js +0 -62
- package/dist/commands/search.js.map +0 -1
- package/dist/commands/session.d.ts +0 -4
- package/dist/commands/session.js +0 -31
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -25
- package/dist/commands/setup.js +0 -584
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/task.d.ts +0 -4
- package/dist/commands/task.js +0 -140
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/workspace.d.ts +0 -8
- package/dist/commands/workspace.js +0 -251
- package/dist/commands/workspace.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -142
- package/dist/index.js.map +0 -1
- package/dist/lib/capture-filter.d.ts +0 -9
- package/dist/lib/capture-filter.js +0 -14
- package/dist/lib/capture-filter.js.map +0 -1
- package/dist/lib/client.d.ts +0 -20
- package/dist/lib/client.js +0 -160
- package/dist/lib/client.js.map +0 -1
- package/dist/lib/compounding-worker.d.ts +0 -2
- package/dist/lib/compounding-worker.js +0 -21
- package/dist/lib/compounding-worker.js.map +0 -1
- package/dist/lib/compounding.d.ts +0 -20
- package/dist/lib/compounding.js +0 -45
- package/dist/lib/compounding.js.map +0 -1
- package/dist/lib/config.d.ts +0 -35
- package/dist/lib/config.js +0 -96
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/context-format.d.ts +0 -7
- package/dist/lib/context-format.js +0 -21
- package/dist/lib/context-format.js.map +0 -1
- package/dist/lib/errors.d.ts +0 -18
- package/dist/lib/errors.js +0 -30
- package/dist/lib/errors.js.map +0 -1
- package/dist/lib/file-scanner.d.ts +0 -38
- package/dist/lib/file-scanner.js +0 -188
- package/dist/lib/file-scanner.js.map +0 -1
- package/dist/lib/graph-html.d.ts +0 -59
- package/dist/lib/graph-html.js +0 -859
- package/dist/lib/graph-html.js.map +0 -1
- package/dist/lib/installers.d.ts +0 -80
- package/dist/lib/installers.js +0 -602
- package/dist/lib/installers.js.map +0 -1
- package/dist/lib/integrations.d.ts +0 -23
- package/dist/lib/integrations.js +0 -25
- package/dist/lib/integrations.js.map +0 -1
- package/dist/lib/output.d.ts +0 -7
- package/dist/lib/output.js +0 -70
- package/dist/lib/output.js.map +0 -1
- package/dist/lib/platform-detect.d.ts +0 -23
- package/dist/lib/platform-detect.js +0 -359
- package/dist/lib/platform-detect.js.map +0 -1
- package/dist/lib/project-config.d.ts +0 -53
- package/dist/lib/project-config.js +0 -151
- package/dist/lib/project-config.js.map +0 -1
- package/dist/lib/prompt.d.ts +0 -15
- package/dist/lib/prompt.js +0 -213
- package/dist/lib/prompt.js.map +0 -1
- package/dist/lib/rate-limiter.d.ts +0 -13
- package/dist/lib/rate-limiter.js +0 -49
- package/dist/lib/rate-limiter.js.map +0 -1
- package/dist/lib/recall-filter.d.ts +0 -5
- package/dist/lib/recall-filter.js +0 -24
- package/dist/lib/recall-filter.js.map +0 -1
- package/dist/lib/session-store.d.ts +0 -15
- package/dist/lib/session-store.js +0 -62
- package/dist/lib/session-store.js.map +0 -1
- package/dist/lib/tui.d.ts +0 -57
- package/dist/lib/tui.js +0 -247
- package/dist/lib/tui.js.map +0 -1
- package/dist/lib/workspace-registry.d.ts +0 -47
- package/dist/lib/workspace-registry.js +0 -240
- package/dist/lib/workspace-registry.js.map +0 -1
- package/dist/mcp/channel.d.ts +0 -24
- package/dist/mcp/channel.js +0 -198
- package/dist/mcp/channel.js.map +0 -1
- package/dist/mcp/client.d.ts +0 -20
- package/dist/mcp/client.js +0 -131
- package/dist/mcp/client.js.map +0 -1
- package/dist/mcp/config.d.ts +0 -19
- package/dist/mcp/config.js +0 -48
- package/dist/mcp/config.js.map +0 -1
- package/dist/mcp/context-files.d.ts +0 -9
- package/dist/mcp/context-files.js +0 -90
- package/dist/mcp/context-files.js.map +0 -1
- package/dist/mcp/file-manifest.d.ts +0 -27
- package/dist/mcp/file-manifest.js +0 -68
- package/dist/mcp/file-manifest.js.map +0 -1
- package/dist/mcp/file-scanner.d.ts +0 -17
- package/dist/mcp/file-scanner.js +0 -77
- package/dist/mcp/file-scanner.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -2
- package/dist/mcp/index.js +0 -51
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/rate-limiter.d.ts +0 -14
- package/dist/mcp/rate-limiter.js +0 -60
- package/dist/mcp/rate-limiter.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -6
- package/dist/mcp/server.js +0 -44
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session-store.d.ts +0 -16
- package/dist/mcp/session-store.js +0 -70
- package/dist/mcp/session-store.js.map +0 -1
- package/dist/mcp/tools/context.d.ts +0 -3
- package/dist/mcp/tools/context.js +0 -65
- package/dist/mcp/tools/context.js.map +0 -1
- package/dist/mcp/tools/insights.d.ts +0 -3
- package/dist/mcp/tools/insights.js +0 -24
- package/dist/mcp/tools/insights.js.map +0 -1
- package/dist/mcp/tools/integrations.d.ts +0 -3
- package/dist/mcp/tools/integrations.js +0 -27
- package/dist/mcp/tools/integrations.js.map +0 -1
- package/dist/mcp/tools/lists.d.ts +0 -3
- package/dist/mcp/tools/lists.js +0 -101
- package/dist/mcp/tools/lists.js.map +0 -1
- package/dist/mcp/tools/notes.d.ts +0 -3
- package/dist/mcp/tools/notes.js +0 -52
- package/dist/mcp/tools/notes.js.map +0 -1
- package/dist/mcp/tools/notifications.d.ts +0 -3
- package/dist/mcp/tools/notifications.js +0 -53
- package/dist/mcp/tools/notifications.js.map +0 -1
- package/dist/mcp/tools/records.d.ts +0 -3
- package/dist/mcp/tools/records.js +0 -74
- package/dist/mcp/tools/records.js.map +0 -1
- package/dist/mcp/tools/register.d.ts +0 -3
- package/dist/mcp/tools/register.js +0 -41
- package/dist/mcp/tools/register.js.map +0 -1
- package/dist/mcp/tools/relationships.d.ts +0 -3
- package/dist/mcp/tools/relationships.js +0 -47
- package/dist/mcp/tools/relationships.js.map +0 -1
- package/dist/mcp/tools/scan.d.ts +0 -3
- package/dist/mcp/tools/scan.js +0 -37
- package/dist/mcp/tools/scan.js.map +0 -1
- package/dist/mcp/tools/schema.d.ts +0 -3
- package/dist/mcp/tools/schema.js +0 -108
- package/dist/mcp/tools/schema.js.map +0 -1
- package/dist/mcp/tools/search.d.ts +0 -3
- package/dist/mcp/tools/search.js +0 -8
- package/dist/mcp/tools/search.js.map +0 -1
- package/dist/mcp/tools/tasks.d.ts +0 -3
- package/dist/mcp/tools/tasks.js +0 -88
- package/dist/mcp/tools/tasks.js.map +0 -1
- package/dist/mcp/workspace-data-dir.d.ts +0 -2
- package/dist/mcp/workspace-data-dir.js +0 -28
- package/dist/mcp/workspace-data-dir.js.map +0 -1
- package/dist/orchestration/budget.d.ts +0 -32
- package/dist/orchestration/budget.js +0 -72
- package/dist/orchestration/budget.js.map +0 -1
- package/dist/orchestration/executor.d.ts +0 -59
- package/dist/orchestration/executor.js +0 -197
- package/dist/orchestration/executor.js.map +0 -1
- package/dist/orchestration/router.d.ts +0 -30
- package/dist/orchestration/router.js +0 -98
- package/dist/orchestration/router.js.map +0 -1
- package/dist/orchestration/templates.d.ts +0 -11
- package/dist/orchestration/templates.js +0 -99
- package/dist/orchestration/templates.js.map +0 -1
- package/dist/orchestration/types.d.ts +0 -58
- package/dist/orchestration/types.js +0 -7
- package/dist/orchestration/types.js.map +0 -1
- package/dist/plugin/auto-capture.d.ts +0 -11
- package/dist/plugin/auto-capture.js +0 -135
- package/dist/plugin/auto-capture.js.map +0 -1
- package/dist/plugin/auto-recall-worker.d.ts +0 -2
- package/dist/plugin/auto-recall-worker.js +0 -74
- package/dist/plugin/auto-recall-worker.js.map +0 -1
- package/dist/plugin/auto-recall.d.ts +0 -11
- package/dist/plugin/auto-recall.js +0 -186
- package/dist/plugin/auto-recall.js.map +0 -1
- package/dist/plugin/auto-register.d.ts +0 -10
- package/dist/plugin/auto-register.js +0 -81
- package/dist/plugin/auto-register.js.map +0 -1
- package/dist/plugin/auto-scan.d.ts +0 -10
- package/dist/plugin/auto-scan.js +0 -54
- package/dist/plugin/auto-scan.js.map +0 -1
- package/dist/plugin/auto-session-start.d.ts +0 -14
- package/dist/plugin/auto-session-start.js +0 -156
- package/dist/plugin/auto-session-start.js.map +0 -1
- package/dist/plugin/capture-filter.d.ts +0 -21
- package/dist/plugin/capture-filter.js +0 -32
- package/dist/plugin/capture-filter.js.map +0 -1
- package/dist/plugin/config.d.ts +0 -61
- package/dist/plugin/config.js +0 -182
- package/dist/plugin/config.js.map +0 -1
- package/dist/plugin/context-files.d.ts +0 -23
- package/dist/plugin/context-files.js +0 -103
- package/dist/plugin/context-files.js.map +0 -1
- package/dist/plugin/context-format.d.ts +0 -18
- package/dist/plugin/context-format.js +0 -34
- package/dist/plugin/context-format.js.map +0 -1
- package/dist/plugin/file-manifest.d.ts +0 -27
- package/dist/plugin/file-manifest.js +0 -68
- package/dist/plugin/file-manifest.js.map +0 -1
- package/dist/plugin/file-scanner.d.ts +0 -19
- package/dist/plugin/file-scanner.js +0 -90
- package/dist/plugin/file-scanner.js.map +0 -1
- package/dist/plugin/nex-client.d.ts +0 -50
- package/dist/plugin/nex-client.js +0 -129
- package/dist/plugin/nex-client.js.map +0 -1
- package/dist/plugin/rate-limiter.d.ts +0 -26
- package/dist/plugin/rate-limiter.js +0 -65
- package/dist/plugin/rate-limiter.js.map +0 -1
- package/dist/plugin/recall-cache.d.ts +0 -41
- package/dist/plugin/recall-cache.js +0 -195
- package/dist/plugin/recall-cache.js.map +0 -1
- package/dist/plugin/recall-filter.d.ts +0 -13
- package/dist/plugin/recall-filter.js +0 -39
- package/dist/plugin/recall-filter.js.map +0 -1
- package/dist/plugin/session-store.d.ts +0 -23
- package/dist/plugin/session-store.js +0 -73
- package/dist/plugin/session-store.js.map +0 -1
- package/dist/plugin/workspace-data-dir.d.ts +0 -2
- package/dist/plugin/workspace-data-dir.js +0 -31
- package/dist/plugin/workspace-data-dir.js.map +0 -1
- package/dist/tui/agent-colors.d.ts +0 -19
- package/dist/tui/agent-colors.js +0 -34
- package/dist/tui/agent-colors.js.map +0 -1
- package/dist/tui/app.d.ts +0 -14
- package/dist/tui/app.js +0 -181
- package/dist/tui/app.js.map +0 -1
- package/dist/tui/channel-colors.d.ts +0 -16
- package/dist/tui/channel-colors.js +0 -43
- package/dist/tui/channel-colors.js.map +0 -1
- package/dist/tui/components/agent-card.d.ts +0 -11
- package/dist/tui/components/agent-card.js +0 -40
- package/dist/tui/components/agent-card.js.map +0 -1
- package/dist/tui/components/banner.d.ts +0 -44
- package/dist/tui/components/banner.js +0 -130
- package/dist/tui/components/banner.js.map +0 -1
- package/dist/tui/components/channel-colors.d.ts +0 -21
- package/dist/tui/components/channel-colors.js +0 -53
- package/dist/tui/components/channel-colors.js.map +0 -1
- package/dist/tui/components/channel-message.d.ts +0 -53
- package/dist/tui/components/channel-message.js +0 -66
- package/dist/tui/components/channel-message.js.map +0 -1
- package/dist/tui/components/chat-input.d.ts +0 -11
- package/dist/tui/components/chat-input.js +0 -19
- package/dist/tui/components/chat-input.js.map +0 -1
- package/dist/tui/components/data-table.d.ts +0 -11
- package/dist/tui/components/data-table.js +0 -47
- package/dist/tui/components/data-table.js.map +0 -1
- package/dist/tui/components/error-box.d.ts +0 -11
- package/dist/tui/components/error-box.js +0 -59
- package/dist/tui/components/error-box.js.map +0 -1
- package/dist/tui/components/help-screen.d.ts +0 -3
- package/dist/tui/components/help-screen.js +0 -63
- package/dist/tui/components/help-screen.js.map +0 -1
- package/dist/tui/components/index.d.ts +0 -17
- package/dist/tui/components/index.js +0 -10
- package/dist/tui/components/index.js.map +0 -1
- package/dist/tui/components/inline-confirm.d.ts +0 -14
- package/dist/tui/components/inline-confirm.js +0 -13
- package/dist/tui/components/inline-confirm.js.map +0 -1
- package/dist/tui/components/inline-select.d.ts +0 -21
- package/dist/tui/components/inline-select.js +0 -20
- package/dist/tui/components/inline-select.js.map +0 -1
- package/dist/tui/components/markdown.d.ts +0 -6
- package/dist/tui/components/markdown.js +0 -179
- package/dist/tui/components/markdown.js.map +0 -1
- package/dist/tui/components/mention-autocomplete.d.ts +0 -79
- package/dist/tui/components/mention-autocomplete.js +0 -250
- package/dist/tui/components/mention-autocomplete.js.map +0 -1
- package/dist/tui/components/message-list.d.ts +0 -18
- package/dist/tui/components/message-list.js +0 -29
- package/dist/tui/components/message-list.js.map +0 -1
- package/dist/tui/components/picker.d.ts +0 -16
- package/dist/tui/components/picker.js +0 -32
- package/dist/tui/components/picker.js.map +0 -1
- package/dist/tui/components/progress-steps.d.ts +0 -13
- package/dist/tui/components/progress-steps.js +0 -21
- package/dist/tui/components/progress-steps.js.map +0 -1
- package/dist/tui/components/slack/compose.d.ts +0 -27
- package/dist/tui/components/slack/compose.js +0 -147
- package/dist/tui/components/slack/compose.js.map +0 -1
- package/dist/tui/components/slack/layout.d.ts +0 -36
- package/dist/tui/components/slack/layout.js +0 -96
- package/dist/tui/components/slack/layout.js.map +0 -1
- package/dist/tui/components/slack/messages.d.ts +0 -72
- package/dist/tui/components/slack/messages.js +0 -177
- package/dist/tui/components/slack/messages.js.map +0 -1
- package/dist/tui/components/slack/quick-switcher.d.ts +0 -33
- package/dist/tui/components/slack/quick-switcher.js +0 -98
- package/dist/tui/components/slack/quick-switcher.js.map +0 -1
- package/dist/tui/components/slack/sidebar-types.d.ts +0 -65
- package/dist/tui/components/slack/sidebar-types.js +0 -7
- package/dist/tui/components/slack/sidebar-types.js.map +0 -1
- package/dist/tui/components/slack/sidebar.d.ts +0 -46
- package/dist/tui/components/slack/sidebar.js +0 -52
- package/dist/tui/components/slack/sidebar.js.map +0 -1
- package/dist/tui/components/slack/thread-panel.d.ts +0 -45
- package/dist/tui/components/slack/thread-panel.js +0 -47
- package/dist/tui/components/slack/thread-panel.js.map +0 -1
- package/dist/tui/components/slash-autocomplete.d.ts +0 -83
- package/dist/tui/components/slash-autocomplete.js +0 -233
- package/dist/tui/components/slash-autocomplete.js.map +0 -1
- package/dist/tui/components/spinner.d.ts +0 -17
- package/dist/tui/components/spinner.js +0 -30
- package/dist/tui/components/spinner.js.map +0 -1
- package/dist/tui/components/status-bar.d.ts +0 -23
- package/dist/tui/components/status-bar.js +0 -55
- package/dist/tui/components/status-bar.js.map +0 -1
- package/dist/tui/components/success-box.d.ts +0 -7
- package/dist/tui/components/success-box.js +0 -10
- package/dist/tui/components/success-box.js.map +0 -1
- package/dist/tui/components/tool-indicator.d.ts +0 -12
- package/dist/tui/components/tool-indicator.js +0 -18
- package/dist/tui/components/tool-indicator.js.map +0 -1
- package/dist/tui/components/viewport.d.ts +0 -9
- package/dist/tui/components/viewport.js +0 -24
- package/dist/tui/components/viewport.js.map +0 -1
- package/dist/tui/generative/bindings.d.ts +0 -27
- package/dist/tui/generative/bindings.js +0 -152
- package/dist/tui/generative/bindings.js.map +0 -1
- package/dist/tui/generative/registry.d.ts +0 -19
- package/dist/tui/generative/registry.js +0 -31
- package/dist/tui/generative/registry.js.map +0 -1
- package/dist/tui/generative/renderer.d.ts +0 -24
- package/dist/tui/generative/renderer.js +0 -160
- package/dist/tui/generative/renderer.js.map +0 -1
- package/dist/tui/generative/types.d.ts +0 -68
- package/dist/tui/generative/types.js +0 -7
- package/dist/tui/generative/types.js.map +0 -1
- package/dist/tui/hooks/use-cancellable.d.ts +0 -28
- package/dist/tui/hooks/use-cancellable.js +0 -51
- package/dist/tui/hooks/use-cancellable.js.map +0 -1
- package/dist/tui/hooks/use-streaming.d.ts +0 -44
- package/dist/tui/hooks/use-streaming.js +0 -105
- package/dist/tui/hooks/use-streaming.js.map +0 -1
- package/dist/tui/index.d.ts +0 -4
- package/dist/tui/index.js +0 -7
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/keybindings.d.ts +0 -25
- package/dist/tui/keybindings.js +0 -277
- package/dist/tui/keybindings.js.map +0 -1
- package/dist/tui/register-views.d.ts +0 -8
- package/dist/tui/register-views.js +0 -122
- package/dist/tui/register-views.js.map +0 -1
- package/dist/tui/router.d.ts +0 -29
- package/dist/tui/router.js +0 -87
- package/dist/tui/router.js.map +0 -1
- package/dist/tui/services/agent-service.d.ts +0 -58
- package/dist/tui/services/agent-service.js +0 -197
- package/dist/tui/services/agent-service.js.map +0 -1
- package/dist/tui/services/calendar-service.d.ts +0 -31
- package/dist/tui/services/calendar-service.js +0 -133
- package/dist/tui/services/calendar-service.js.map +0 -1
- package/dist/tui/services/chat-service.d.ts +0 -28
- package/dist/tui/services/chat-service.js +0 -91
- package/dist/tui/services/chat-service.js.map +0 -1
- package/dist/tui/services/orchestration-service.d.ts +0 -42
- package/dist/tui/services/orchestration-service.js +0 -153
- package/dist/tui/services/orchestration-service.js.map +0 -1
- package/dist/tui/slash-commands.d.ts +0 -106
- package/dist/tui/slash-commands.js +0 -1421
- package/dist/tui/slash-commands.js.map +0 -1
- package/dist/tui/store.d.ts +0 -96
- package/dist/tui/store.js +0 -120
- package/dist/tui/store.js.map +0 -1
- package/dist/tui/theme.d.ts +0 -40
- package/dist/tui/theme.js +0 -39
- package/dist/tui/theme.js.map +0 -1
- package/dist/tui/tui-context.d.ts +0 -22
- package/dist/tui/tui-context.js +0 -17
- package/dist/tui/tui-context.js.map +0 -1
- package/dist/tui/views/agent-list.d.ts +0 -8
- package/dist/tui/views/agent-list.js +0 -11
- package/dist/tui/views/agent-list.js.map +0 -1
- package/dist/tui/views/ask-chat.d.ts +0 -9
- package/dist/tui/views/ask-chat.js +0 -40
- package/dist/tui/views/ask-chat.js.map +0 -1
- package/dist/tui/views/calendar.d.ts +0 -15
- package/dist/tui/views/calendar.js +0 -29
- package/dist/tui/views/calendar.js.map +0 -1
- package/dist/tui/views/chat.d.ts +0 -18
- package/dist/tui/views/chat.js +0 -28
- package/dist/tui/views/chat.js.map +0 -1
- package/dist/tui/views/generative.d.ts +0 -14
- package/dist/tui/views/generative.js +0 -37
- package/dist/tui/views/generative.js.map +0 -1
- package/dist/tui/views/help.d.ts +0 -6
- package/dist/tui/views/help.js +0 -9
- package/dist/tui/views/help.js.map +0 -1
- package/dist/tui/views/home-screen.d.ts +0 -67
- package/dist/tui/views/home-screen.js +0 -192
- package/dist/tui/views/home-screen.js.map +0 -1
- package/dist/tui/views/home.d.ts +0 -33
- package/dist/tui/views/home.js +0 -60
- package/dist/tui/views/home.js.map +0 -1
- package/dist/tui/views/index.d.ts +0 -20
- package/dist/tui/views/index.js +0 -11
- package/dist/tui/views/index.js.map +0 -1
- package/dist/tui/views/insights.d.ts +0 -19
- package/dist/tui/views/insights.js +0 -46
- package/dist/tui/views/insights.js.map +0 -1
- package/dist/tui/views/orchestration.d.ts +0 -18
- package/dist/tui/views/orchestration.js +0 -73
- package/dist/tui/views/orchestration.js.map +0 -1
- package/dist/tui/views/record-detail.d.ts +0 -10
- package/dist/tui/views/record-detail.js +0 -22
- package/dist/tui/views/record-detail.js.map +0 -1
- package/dist/tui/views/record-list.d.ts +0 -15
- package/dist/tui/views/record-list.js +0 -22
- package/dist/tui/views/record-list.js.map +0 -1
- package/dist/tui/views/slack-channel-header.d.ts +0 -15
- package/dist/tui/views/slack-channel-header.js +0 -16
- package/dist/tui/views/slack-channel-header.js.map +0 -1
- package/dist/tui/views/slack-home.d.ts +0 -21
- package/dist/tui/views/slack-home.js +0 -572
- package/dist/tui/views/slack-home.js.map +0 -1
- package/dist/tui/views/stream.d.ts +0 -16
- package/dist/tui/views/stream.js +0 -210
- package/dist/tui/views/stream.js.map +0 -1
- package/dist/tui/views/task-board.d.ts +0 -21
- package/dist/tui/views/task-board.js +0 -33
- package/dist/tui/views/task-board.js.map +0 -1
- package/dist/tui/views/timeline.d.ts +0 -17
- package/dist/tui/views/timeline.js +0 -24
- package/dist/tui/views/timeline.js.map +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NexApiClient } from "./client.js";
|
|
2
|
-
import type { RateLimiter } from "./rate-limiter.js";
|
|
3
|
-
export interface ScanConfig {
|
|
4
|
-
enabled: boolean;
|
|
5
|
-
extensions: string[];
|
|
6
|
-
maxFileSize: number;
|
|
7
|
-
maxFilesPerScan: number;
|
|
8
|
-
scanDepth: number;
|
|
9
|
-
ignoreDirs: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface ScanResult {
|
|
12
|
-
scanned: number;
|
|
13
|
-
ingested: number;
|
|
14
|
-
skipped: number;
|
|
15
|
-
errors: number;
|
|
16
|
-
}
|
|
17
|
-
export declare function scanAndIngest(client: NexApiClient, rateLimiter: RateLimiter, cwd: string, config: ScanConfig): Promise<ScanResult>;
|
package/dist/mcp/file-scanner.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Core file scanner — walks project directories, detects changed files,
|
|
3
|
-
* and ingests them into Nex via the developer API.
|
|
4
|
-
*/
|
|
5
|
-
import { readdirSync, statSync, readFileSync } from "node:fs";
|
|
6
|
-
import { join, relative, extname } from "node:path";
|
|
7
|
-
import { readManifest, writeManifest, isChanged, markIngested } from "./file-manifest.js";
|
|
8
|
-
function walkDir(dir, cwd, config, depth, results) {
|
|
9
|
-
if (depth > config.scanDepth)
|
|
10
|
-
return;
|
|
11
|
-
let entries;
|
|
12
|
-
try {
|
|
13
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
for (const entry of entries) {
|
|
19
|
-
const fullPath = join(dir, entry.name);
|
|
20
|
-
if (entry.isDirectory()) {
|
|
21
|
-
if (config.ignoreDirs.includes(entry.name))
|
|
22
|
-
continue;
|
|
23
|
-
walkDir(fullPath, cwd, config, depth + 1, results);
|
|
24
|
-
}
|
|
25
|
-
else if (entry.isFile()) {
|
|
26
|
-
const ext = extname(entry.name).toLowerCase();
|
|
27
|
-
if (!config.extensions.includes(ext))
|
|
28
|
-
continue;
|
|
29
|
-
try {
|
|
30
|
-
const stat = statSync(fullPath);
|
|
31
|
-
results.push({ absolutePath: fullPath, relativePath: relative(cwd, fullPath), stat });
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// stat failed — skip
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export async function scanAndIngest(client, rateLimiter, cwd, config) {
|
|
40
|
-
const result = { scanned: 0, ingested: 0, skipped: 0, errors: 0 };
|
|
41
|
-
if (!config.enabled)
|
|
42
|
-
return result;
|
|
43
|
-
const manifest = readManifest();
|
|
44
|
-
const candidates = [];
|
|
45
|
-
walkDir(cwd, cwd, config, 0, candidates);
|
|
46
|
-
result.scanned = candidates.length;
|
|
47
|
-
const changed = candidates
|
|
48
|
-
.filter((f) => isChanged(f.absolutePath, f.stat, manifest))
|
|
49
|
-
.sort((a, b) => b.stat.mtimeMs - a.stat.mtimeMs)
|
|
50
|
-
.slice(0, config.maxFilesPerScan);
|
|
51
|
-
result.skipped = candidates.length - changed.length;
|
|
52
|
-
for (const file of changed) {
|
|
53
|
-
if (!rateLimiter.canProceed()) {
|
|
54
|
-
process.stderr.write(`[nex-scan] Rate limited — stopping after ${result.ingested} files\n`);
|
|
55
|
-
result.skipped += changed.length - result.ingested - result.errors;
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
let content = readFileSync(file.absolutePath, "utf-8");
|
|
60
|
-
if (content.length > config.maxFileSize) {
|
|
61
|
-
content = content.slice(0, config.maxFileSize) + "\n[...truncated]";
|
|
62
|
-
}
|
|
63
|
-
const context = `file-scan:${file.relativePath}`;
|
|
64
|
-
await client.post("/v1/context/text", { content, context });
|
|
65
|
-
rateLimiter.recordRequest();
|
|
66
|
-
markIngested(file.absolutePath, file.stat, context, manifest);
|
|
67
|
-
result.ingested++;
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
process.stderr.write(`[nex-scan] Failed to ingest ${file.relativePath}: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
71
|
-
result.errors++;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
writeManifest(manifest);
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=file-scanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-scanner.js","sourceRoot":"","sources":["../../src/mcp/file-scanner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAc,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA0B1F,SAAS,OAAO,CAAC,GAAW,EAAE,GAAW,EAAE,MAAkB,EAAE,KAAa,EAAE,OAAwB;IACpG,IAAI,KAAK,GAAG,MAAM,CAAC,SAAS;QAAE,OAAO;IACrC,IAAI,OAAO,CAAC;IACZ,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YACrD,OAAO,CAAC,QAAQ,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B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,IAAI,CAAC,YAAY,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAChI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IAED,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/mcp/index.d.ts
DELETED
package/dist/mcp/index.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
4
|
-
import { createServer } from "./server.js";
|
|
5
|
-
import { createServer as createHttpServer } from "node:http";
|
|
6
|
-
import { loadApiKey } from "./config.js";
|
|
7
|
-
import { startChannel } from "./channel.js";
|
|
8
|
-
const apiKey = loadApiKey();
|
|
9
|
-
if (!apiKey) {
|
|
10
|
-
console.error("No API key found (checked NEX_API_KEY env and ~/.nex/config.json). Starting in registration-only mode. Use the 'register' tool to create an account and get an API key. Once registered, all context, search, and scan tools become available.");
|
|
11
|
-
}
|
|
12
|
-
const transport = process.env.MCP_TRANSPORT ?? "stdio";
|
|
13
|
-
async function main() {
|
|
14
|
-
const { server, client } = createServer(apiKey);
|
|
15
|
-
if (transport === "http") {
|
|
16
|
-
const port = parseInt(process.env.MCP_PORT ?? "3001", 10);
|
|
17
|
-
const httpTransport = new StreamableHTTPServerTransport({
|
|
18
|
-
sessionIdGenerator: undefined,
|
|
19
|
-
});
|
|
20
|
-
const httpServer = createHttpServer(async (req, res) => {
|
|
21
|
-
const url = new URL(req.url ?? "/", `http://localhost:${port}`);
|
|
22
|
-
if (url.pathname === "/mcp") {
|
|
23
|
-
await httpTransport.handleRequest(req, res);
|
|
24
|
-
}
|
|
25
|
-
else if (url.pathname === "/health") {
|
|
26
|
-
res.writeHead(200, { "Content-Type": "application/json" });
|
|
27
|
-
res.end(JSON.stringify({ status: "ok" }));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
res.writeHead(404);
|
|
31
|
-
res.end("Not found");
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
await server.connect(httpTransport);
|
|
35
|
-
startChannel(server.server, client);
|
|
36
|
-
httpServer.listen(port, () => {
|
|
37
|
-
console.error(`Nex MCP server running on http://localhost:${port}/mcp`);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
const stdioTransport = new StdioServerTransport();
|
|
42
|
-
await server.connect(stdioTransport);
|
|
43
|
-
startChannel(server.server, client);
|
|
44
|
-
console.error("Nex MCP server running on stdio");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
main().catch((err) => {
|
|
48
|
-
console.error("Fatal error:", err);
|
|
49
|
-
process.exit(1);
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=index.js.map
|
package/dist/mcp/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAC5B,I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AAC,CAAC;QAEH,MAAM,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACpC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;YAC3B,OAAO,CAAC,KAAK,CAAC,8CAA8C,IAAI,MAAM,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,cAAc,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAClD,MAAM,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACrC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface RateLimiterConfig {
|
|
2
|
-
maxRequests: number;
|
|
3
|
-
windowMs: number;
|
|
4
|
-
dataDir: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class RateLimiter {
|
|
7
|
-
private config;
|
|
8
|
-
private filePath;
|
|
9
|
-
constructor(config?: Partial<RateLimiterConfig>);
|
|
10
|
-
private readTimestamps;
|
|
11
|
-
private writeTimestamps;
|
|
12
|
-
canProceed(): boolean;
|
|
13
|
-
recordRequest(): void;
|
|
14
|
-
}
|
package/dist/mcp/rate-limiter.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File-based sliding window rate limiter.
|
|
3
|
-
* Designed for Nex /text endpoint (10 req/min).
|
|
4
|
-
*
|
|
5
|
-
* Persists timestamps to a JSON file so rate limits are respected
|
|
6
|
-
* across invocations.
|
|
7
|
-
*/
|
|
8
|
-
import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
9
|
-
import { join } from "node:path";
|
|
10
|
-
import { workspaceDataDir } from "./workspace-data-dir.js";
|
|
11
|
-
const DEFAULTS = {
|
|
12
|
-
maxRequests: 10,
|
|
13
|
-
windowMs: 60_000,
|
|
14
|
-
dataDir: workspaceDataDir(),
|
|
15
|
-
};
|
|
16
|
-
export class RateLimiter {
|
|
17
|
-
config;
|
|
18
|
-
filePath;
|
|
19
|
-
constructor(config) {
|
|
20
|
-
this.config = { ...DEFAULTS, ...config };
|
|
21
|
-
this.filePath = join(this.config.dataDir, "rate-limiter.json");
|
|
22
|
-
mkdirSync(this.config.dataDir, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
readTimestamps() {
|
|
25
|
-
try {
|
|
26
|
-
const raw = readFileSync(this.filePath, "utf-8");
|
|
27
|
-
const data = JSON.parse(raw);
|
|
28
|
-
if (Array.isArray(data))
|
|
29
|
-
return data;
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
writeTimestamps(timestamps) {
|
|
37
|
-
try {
|
|
38
|
-
writeFileSync(this.filePath, JSON.stringify(timestamps), "utf-8");
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// Best-effort
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
canProceed() {
|
|
45
|
-
const now = Date.now();
|
|
46
|
-
const timestamps = this.readTimestamps().filter((t) => now - t < this.config.windowMs);
|
|
47
|
-
if (timestamps.length >= this.config.maxRequests) {
|
|
48
|
-
this.writeTimestamps(timestamps);
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
recordRequest() {
|
|
54
|
-
const now = Date.now();
|
|
55
|
-
const timestamps = this.readTimestamps().filter((t) => now - t < this.config.windowMs);
|
|
56
|
-
timestamps.push(now);
|
|
57
|
-
this.writeTimestamps(timestamps);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=rate-limiter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rate-limiter.js","sourceRoot":"","sources":["../../src/mcp/rate-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,MAAM,QAAQ,GAAsB;IAClC,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,gBAAgB,EAAE;CAC5B,CAAC;AAEF,MAAM,OAAO,WAAW;IACd,MAAM,CAAoB;IAC1B,QAAQ,CAAS;IAEzB,YAAY,MAAmC;QAC7C,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QAC/D,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEO,cAAc;QACpB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;gBAAE,OAAO,IAAI,CAAC;YACrC,OAAO,EAAE,CAAC;QACZ,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,UAAoB;QAC1C,IAAI,CAAC;YACH,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;IACH,CAAC;IAED,UAAU;QACR,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvF,IAAI,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACjD,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;YACjC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvF,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;CACF"}
|
package/dist/mcp/server.d.ts
DELETED
package/dist/mcp/server.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { NexApiClient } from "./client.js";
|
|
3
|
-
import { registerContextTools } from "./tools/context.js";
|
|
4
|
-
import { registerSearchTools } from "./tools/search.js";
|
|
5
|
-
import { registerSchemaTools } from "./tools/schema.js";
|
|
6
|
-
import { registerRecordTools } from "./tools/records.js";
|
|
7
|
-
import { registerRelationshipTools } from "./tools/relationships.js";
|
|
8
|
-
import { registerListTools } from "./tools/lists.js";
|
|
9
|
-
import { registerTaskTools } from "./tools/tasks.js";
|
|
10
|
-
import { registerNoteTools } from "./tools/notes.js";
|
|
11
|
-
import { registerInsightTools } from "./tools/insights.js";
|
|
12
|
-
import { registerRegistrationTools } from "./tools/register.js";
|
|
13
|
-
import { registerScanTools } from "./tools/scan.js";
|
|
14
|
-
import { registerIntegrationTools } from "./tools/integrations.js";
|
|
15
|
-
import { registerNotificationTools } from "./tools/notifications.js";
|
|
16
|
-
export function createServer(apiKey) {
|
|
17
|
-
const server = new McpServer({ name: "nex", version: "0.1.0" }, {
|
|
18
|
-
capabilities: {
|
|
19
|
-
experimental: { "claude/channel": {} },
|
|
20
|
-
},
|
|
21
|
-
instructions: 'Events from the nex channel arrive as <channel source="nex" type="...">. ' +
|
|
22
|
-
"They contain daily digest summaries (type=daily_digest) and proactive " +
|
|
23
|
-
"notifications (type=proactive_notification) about important context " +
|
|
24
|
-
"changes — deals, meetings, relationships, tasks. These are one-way " +
|
|
25
|
-
"informational: acknowledge them naturally and incorporate into your " +
|
|
26
|
-
"awareness. No reply expected.",
|
|
27
|
-
});
|
|
28
|
-
const client = new NexApiClient(apiKey);
|
|
29
|
-
registerRegistrationTools(server, client);
|
|
30
|
-
registerContextTools(server, client);
|
|
31
|
-
registerSearchTools(server, client);
|
|
32
|
-
registerSchemaTools(server, client);
|
|
33
|
-
registerRecordTools(server, client);
|
|
34
|
-
registerRelationshipTools(server, client);
|
|
35
|
-
registerListTools(server, client);
|
|
36
|
-
registerTaskTools(server, client);
|
|
37
|
-
registerNoteTools(server, client);
|
|
38
|
-
registerInsightTools(server, client);
|
|
39
|
-
registerScanTools(server, client);
|
|
40
|
-
registerIntegrationTools(server, client);
|
|
41
|
-
registerNotificationTools(server, client);
|
|
42
|
-
return { server, client };
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=server.js.map
|
package/dist/mcp/server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,UAAU,YAAY,CAAC,MAAe;IAI1C,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EACjC;QACE,YAAY,EAAE;YACZ,YAAY,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE;SACvC;QACD,YAAY,EACV,2EAA2E;YAC3E,wEAAwE;YACxE,sEAAsE;YACtE,qEAAqE;YACrE,sEAAsE;YACtE,+BAA+B;KAClC,CACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAExC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface SessionStoreConfig {
|
|
2
|
-
maxSize: number;
|
|
3
|
-
dataDir: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class SessionStore {
|
|
6
|
-
private filePath;
|
|
7
|
-
private maxSize;
|
|
8
|
-
constructor(config?: Partial<SessionStoreConfig>);
|
|
9
|
-
private readStore;
|
|
10
|
-
private writeStore;
|
|
11
|
-
get(sessionKey: string): string | undefined;
|
|
12
|
-
set(sessionKey: string, nexSessionId: string): void;
|
|
13
|
-
delete(sessionKey: string): boolean;
|
|
14
|
-
get size(): number;
|
|
15
|
-
clear(): void;
|
|
16
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File-based session store for MCP session ID mapping.
|
|
3
|
-
* Persists session mappings to ~/.nex/mcp-sessions.json.
|
|
4
|
-
*/
|
|
5
|
-
import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
6
|
-
import { join } from "node:path";
|
|
7
|
-
import { workspaceDataDir } from "./workspace-data-dir.js";
|
|
8
|
-
const DEFAULT_MAX = 100;
|
|
9
|
-
const DEFAULT_DATA_DIR = workspaceDataDir();
|
|
10
|
-
export class SessionStore {
|
|
11
|
-
filePath;
|
|
12
|
-
maxSize;
|
|
13
|
-
constructor(config) {
|
|
14
|
-
const dataDir = config?.dataDir ?? DEFAULT_DATA_DIR;
|
|
15
|
-
this.maxSize = config?.maxSize ?? DEFAULT_MAX;
|
|
16
|
-
this.filePath = join(dataDir, "mcp-sessions.json");
|
|
17
|
-
mkdirSync(dataDir, { recursive: true });
|
|
18
|
-
}
|
|
19
|
-
readStore() {
|
|
20
|
-
try {
|
|
21
|
-
const raw = readFileSync(this.filePath, "utf-8");
|
|
22
|
-
const data = JSON.parse(raw);
|
|
23
|
-
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
24
|
-
return data;
|
|
25
|
-
}
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
return {};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
writeStore(store) {
|
|
33
|
-
try {
|
|
34
|
-
writeFileSync(this.filePath, JSON.stringify(store), "utf-8");
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
// Best-effort
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
get(sessionKey) {
|
|
41
|
-
const store = this.readStore();
|
|
42
|
-
return store[sessionKey];
|
|
43
|
-
}
|
|
44
|
-
set(sessionKey, nexSessionId) {
|
|
45
|
-
const store = this.readStore();
|
|
46
|
-
store[sessionKey] = nexSessionId;
|
|
47
|
-
const keys = Object.keys(store);
|
|
48
|
-
while (keys.length > this.maxSize) {
|
|
49
|
-
const oldest = keys.shift();
|
|
50
|
-
delete store[oldest];
|
|
51
|
-
}
|
|
52
|
-
this.writeStore(store);
|
|
53
|
-
}
|
|
54
|
-
delete(sessionKey) {
|
|
55
|
-
const store = this.readStore();
|
|
56
|
-
if (sessionKey in store) {
|
|
57
|
-
delete store[sessionKey];
|
|
58
|
-
this.writeStore(store);
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
get size() {
|
|
64
|
-
return Object.keys(this.readStore()).length;
|
|
65
|
-
}
|
|
66
|
-
clear() {
|
|
67
|
-
this.writeStore({});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=session-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-store.js","sourceRoot":"","sources":["../../src/mcp/session-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAO3D,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;AAE5C,MAAM,OAAO,YAAY;IACf,QAAQ,CAAS;IACjB,OAAO,CAAS;IAExB,YAAY,MAAoC;QAC9C,MAAM,OAAO,GAAG,MAAM,EAAE,OAAO,IAAI,gBAAgB,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,OAAO,IAAI,WAAW,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,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MAAM,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,UAAkB;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC/B,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;YACzB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI;QACN,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;IAC9C,CAAC;IAED,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export function registerContextTools(server, client) {
|
|
3
|
-
server.tool("query_context", "Query the Nex context graph with a natural language question. Returns an AI-generated answer with supporting entities and evidence. Use for open-ended questions about contacts, companies, relationships, or history.", {
|
|
4
|
-
query: z.string().describe("Natural language question about your contacts, companies, or relationships"),
|
|
5
|
-
session_id: z.string().optional().describe("Session ID for multi-turn conversational continuity"),
|
|
6
|
-
}, { readOnlyHint: true, openWorldHint: true }, async ({ query, session_id }) => {
|
|
7
|
-
const body = { query };
|
|
8
|
-
if (session_id)
|
|
9
|
-
body.session_id = session_id;
|
|
10
|
-
const result = await client.post("/v1/context/ask", body);
|
|
11
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
12
|
-
});
|
|
13
|
-
server.tool("add_context", "Ingest unstructured text (meeting notes, emails, conversation transcripts) into the Nex context graph. Automatically extracts entities, relationships, and insights. Returns an artifact_id — use get_artifact_status to check processing results.", {
|
|
14
|
-
content: z.string().describe("The text content to process (meeting notes, email, conversation transcript, etc.)"),
|
|
15
|
-
context: z.string().optional().describe("Additional context about the text, e.g. 'Sales call notes' or 'Email from client'"),
|
|
16
|
-
}, { readOnlyHint: false }, async ({ content, context }) => {
|
|
17
|
-
const body = { content };
|
|
18
|
-
if (context !== undefined)
|
|
19
|
-
body.context = context;
|
|
20
|
-
const result = await client.post("/v1/context/text", body);
|
|
21
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
22
|
-
});
|
|
23
|
-
server.tool("get_artifact_status", "Check the processing status and results of a previously submitted text artifact. Poll until status is 'completed' or 'failed'. Returns extracted entities, relationships, and insights.", { artifact_id: z.string().describe("The artifact ID returned by add_context") }, { readOnlyHint: true }, async ({ artifact_id }) => {
|
|
24
|
-
const result = await client.get(`/v1/context/artifacts/${encodeURIComponent(artifact_id)}`);
|
|
25
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
26
|
-
});
|
|
27
|
-
server.tool("create_list_job", "Create an AI-powered list generation job. Uses natural language to search the context graph and generate a curated list of contacts or companies. Returns a job_id — use get_list_job_status to poll for results.", {
|
|
28
|
-
query: z.string().describe("Natural language description of the list you want, e.g. 'high priority contacts in enterprise deals'"),
|
|
29
|
-
object_type: z.enum(["contact", "company"]).optional().describe("Type of entities to search for (default: contact)"),
|
|
30
|
-
limit: z.number().optional().describe("Maximum number of results (default: 50, max: 100)"),
|
|
31
|
-
include_attributes: z.boolean().optional().describe("Include full attribute values for each entity"),
|
|
32
|
-
}, { readOnlyHint: false }, async ({ query, object_type, limit, include_attributes }) => {
|
|
33
|
-
const body = { query };
|
|
34
|
-
if (object_type)
|
|
35
|
-
body.object_type = object_type;
|
|
36
|
-
if (limit !== undefined)
|
|
37
|
-
body.limit = limit;
|
|
38
|
-
if (include_attributes !== undefined)
|
|
39
|
-
body.include_attributes = include_attributes;
|
|
40
|
-
const result = await client.post("/v1/context/list/jobs", body);
|
|
41
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
42
|
-
});
|
|
43
|
-
server.tool("get_list_job_status", "Check the status and results of an AI list generation job. Poll until status is 'completed' or 'failed'. Returns matched entities with reasons and highlights.", {
|
|
44
|
-
job_id: z.string().describe("The job ID returned by create_list_job"),
|
|
45
|
-
include_attributes: z.boolean().optional().describe("Include full attribute values for each entity"),
|
|
46
|
-
}, { readOnlyHint: true }, async ({ job_id, include_attributes }) => {
|
|
47
|
-
const params = new URLSearchParams();
|
|
48
|
-
if (include_attributes)
|
|
49
|
-
params.set("include_attributes", "true");
|
|
50
|
-
const qs = params.toString();
|
|
51
|
-
const path = `/v1/context/list/jobs/${encodeURIComponent(job_id)}${qs ? `?${qs}` : ""}`;
|
|
52
|
-
const result = await client.get(path);
|
|
53
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
54
|
-
});
|
|
55
|
-
server.tool("search_entities", "Search for entities (people, companies, topics) in the Nex knowledge base. Returns a structured list with names, types, and mention counts.", { query: z.string().describe("Search query to find entities") }, { readOnlyHint: true }, async ({ query }) => {
|
|
56
|
-
const result = await client.post("/v1/context/ask", { query });
|
|
57
|
-
const entities = result.entity_references ?? [];
|
|
58
|
-
if (entities.length === 0) {
|
|
59
|
-
return { content: [{ type: "text", text: "No matching entities found." }] };
|
|
60
|
-
}
|
|
61
|
-
const lines = entities.map(e => `- ${e.name} (${e.type})${e.count ? ` — ${e.count} mentions` : ""}`);
|
|
62
|
-
return { content: [{ type: "text", text: `Found ${entities.length} entities:\n${lines.join("\n")}` }] };
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/mcp/tools/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAoB;IAC1E,MAAM,CAAC,IAAI,CACT,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IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;IAC1G,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export function registerInsightTools(server, client) {
|
|
3
|
-
server.tool("get_insights", "Query insights by time window. Returns discovered opportunities, risks, relationship changes, milestones, and other insights. Use 'last' for a duration window (e.g. '30m', '2h') or 'from'/'to' for an absolute time range.", {
|
|
4
|
-
last: z.string().optional().describe("Duration window, e.g. '30m', '2h', '1h30m'"),
|
|
5
|
-
from: z.string().optional().describe("Start of time range in RFC3339 format"),
|
|
6
|
-
to: z.string().optional().describe("End of time range in RFC3339 format"),
|
|
7
|
-
limit: z.number().optional().describe("Max results (default: 20, max: 100)"),
|
|
8
|
-
}, { readOnlyHint: true }, async ({ last, from, to, limit }) => {
|
|
9
|
-
const params = new URLSearchParams();
|
|
10
|
-
if (last)
|
|
11
|
-
params.set("last", last);
|
|
12
|
-
if (from)
|
|
13
|
-
params.set("from", from);
|
|
14
|
-
if (to)
|
|
15
|
-
params.set("to", to);
|
|
16
|
-
if (limit !== undefined)
|
|
17
|
-
params.set("limit", String(limit));
|
|
18
|
-
const qs = params.toString();
|
|
19
|
-
const path = `/v1/insights${qs ? `?${qs}` : ""}`;
|
|
20
|
-
const result = await client.get(path);
|
|
21
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=insights.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../../../src/mcp/tools/insights.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAoB;IAC1E,MAAM,CAAC,IAAI,CACT,cAAc,EACd,8NAA8N,EAC9N;QACE,IAAI,EAAE,CAAC,C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,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export function registerIntegrationTools(server, client) {
|
|
3
|
-
server.tool("list_integrations", "List all available third-party integrations and their connection status. Calendar integrations (Google Calendar, Outlook Calendar) enable the Nex Meeting Bot which joins calls on any platform (Google Meet, Zoom, Webex, Teams, etc.) and feeds transcripts into the context graph. To connect, use connect_integration. To disconnect, use disconnect_integration.", {}, { readOnlyHint: true }, async () => {
|
|
4
|
-
const result = await client.get("/v1/integrations/");
|
|
5
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
6
|
-
});
|
|
7
|
-
server.tool("connect_integration", "Start connecting a third-party integration via OAuth. Returns an auth_url to open in the browser and a connect_id to poll for status. Calendar integrations (type: 'calendar') enable the Nex Meeting Bot which auto-joins calls and processes transcripts.", {
|
|
8
|
-
type: z.enum(["email", "calendar", "crm", "messaging"]).describe("Integration type"),
|
|
9
|
-
provider: z.enum(["google", "microsoft", "attio", "slack", "salesforce", "hubspot"]).describe("Integration provider"),
|
|
10
|
-
}, { readOnlyHint: false }, async ({ type, provider }) => {
|
|
11
|
-
const result = await client.post(`/v1/integrations/${encodeURIComponent(type)}/${encodeURIComponent(provider)}/connect`);
|
|
12
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
13
|
-
});
|
|
14
|
-
server.tool("get_connect_status", "Check the status of an in-progress OAuth connection. Poll this after connect_integration until status is 'connected'.", {
|
|
15
|
-
connect_id: z.string().describe("Connect ID returned from connect_integration"),
|
|
16
|
-
}, { readOnlyHint: true }, async ({ connect_id }) => {
|
|
17
|
-
const result = await client.get(`/v1/integrations/connect/${encodeURIComponent(connect_id)}/status`);
|
|
18
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
19
|
-
});
|
|
20
|
-
server.tool("disconnect_integration", "Disconnect a third-party integration by connection ID. Get connection IDs from list_integrations.", {
|
|
21
|
-
connection_id: z.string().describe("Connection ID to disconnect"),
|
|
22
|
-
}, { readOnlyHint: false, destructiveHint: true }, async ({ connection_id }) => {
|
|
23
|
-
const result = await client.delete(`/v1/integrations/connections/${encodeURIComponent(connection_id)}`);
|
|
24
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=integrations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../src/mcp/tools/integrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,MAAoB;IAC9E,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,uWAAuW,EACvW,EAAE,EACF,EAAE,YAAY,EAAE,IAAI,EAAE,EACtB,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QACrD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,6PAA6P,EAC7P;QACE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACpF,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,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