profound-mcp 0.14.0 → 0.17.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.
- package/LICENSE +1 -1
- package/README.md +14 -184
- package/code-tool-types.d.mts +6 -9
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +6 -9
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool.d.mts +2 -2
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +2 -2
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +53 -145
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +53 -112
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +15 -9
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +15 -9
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +4 -1
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +4 -1
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +1 -18
- package/http.js.map +1 -1
- package/http.mjs +1 -18
- package/http.mjs.map +1 -1
- package/index.js +4 -40
- package/index.js.map +1 -1
- package/index.mjs +4 -40
- package/index.mjs.map +1 -1
- package/options.d.mts +0 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +0 -9
- package/options.d.ts.map +1 -1
- package/options.js +6 -361
- package/options.js.map +1 -1
- package/options.mjs +6 -361
- package/options.mjs.map +1 -1
- package/package.json +10 -66
- package/server.d.mts +3 -8
- package/server.d.mts.map +1 -1
- package/server.d.ts +3 -8
- package/server.d.ts.map +1 -1
- package/server.js +12 -65
- package/server.js.map +1 -1
- package/server.mjs +11 -62
- package/server.mjs.map +1 -1
- package/src/code-tool-types.ts +6 -9
- package/src/code-tool.ts +60 -138
- package/src/docs-search-tool.ts +8 -1
- package/src/http.ts +1 -19
- package/src/index.ts +5 -52
- package/src/options.ts +7 -388
- package/src/server.ts +12 -72
- package/src/stdio.ts +2 -3
- package/src/{tools/types.ts → types.ts} +1 -1
- package/stdio.d.mts +1 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -2
- package/stdio.d.ts.map +1 -1
- package/stdio.js +2 -2
- package/stdio.js.map +1 -1
- package/stdio.mjs +2 -2
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +1 -1
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +1 -1
- package/types.d.ts.map +1 -0
- package/types.js.map +1 -0
- package/types.mjs.map +1 -0
- package/code-tool-paths.cjs +0 -6
- package/code-tool-paths.cjs.map +0 -1
- package/code-tool-paths.d.cts +0 -2
- package/code-tool-paths.d.cts.map +0 -1
- package/code-tool-worker.d.mts +0 -5
- package/code-tool-worker.d.mts.map +0 -1
- package/code-tool-worker.d.ts +0 -5
- package/code-tool-worker.d.ts.map +0 -1
- package/code-tool-worker.js +0 -169
- package/code-tool-worker.js.map +0 -1
- package/code-tool-worker.mjs +0 -164
- package/code-tool-worker.mjs.map +0 -1
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -3
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -3
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -24
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -16
- package/filtering.mjs.map +0 -1
- package/src/code-tool-paths.cts +0 -3
- package/src/code-tool-worker.ts +0 -215
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -153
- package/src/filtering.ts +0 -18
- package/src/tools/index.ts +0 -99
- package/src/tools/logs/raw/bots-logs-raw.ts +0 -544
- package/src/tools/logs/raw/logs-logs-raw.ts +0 -565
- package/src/tools/organizations/categories/assets-organizations-categories.ts +0 -57
- package/src/tools/organizations/categories/list-organizations-categories.ts +0 -51
- package/src/tools/organizations/categories/prompts-organizations-categories.ts +0 -57
- package/src/tools/organizations/categories/tags-organizations-categories.ts +0 -57
- package/src/tools/organizations/categories/topics-organizations-categories.ts +0 -57
- package/src/tools/organizations/domains-organizations.ts +0 -51
- package/src/tools/organizations/list-assets-organizations.ts +0 -51
- package/src/tools/organizations/models-organizations.ts +0 -51
- package/src/tools/organizations/regions-organizations.ts +0 -51
- package/src/tools/prompts/answers-prompts.ts +0 -370
- package/src/tools/reports/citations-reports.ts +0 -504
- package/src/tools/reports/sentiment-reports.ts +0 -418
- package/src/tools/reports/visibility-reports.ts +0 -364
- package/src/tools.ts +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -83
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -76
- package/tools/index.mjs.map +0 -1
- package/tools/logs/raw/bots-logs-raw.d.mts +0 -45
- package/tools/logs/raw/bots-logs-raw.d.mts.map +0 -1
- package/tools/logs/raw/bots-logs-raw.d.ts +0 -45
- package/tools/logs/raw/bots-logs-raw.d.ts.map +0 -1
- package/tools/logs/raw/bots-logs-raw.js +0 -544
- package/tools/logs/raw/bots-logs-raw.js.map +0 -1
- package/tools/logs/raw/bots-logs-raw.mjs +0 -537
- package/tools/logs/raw/bots-logs-raw.mjs.map +0 -1
- package/tools/logs/raw/logs-logs-raw.d.mts +0 -45
- package/tools/logs/raw/logs-logs-raw.d.mts.map +0 -1
- package/tools/logs/raw/logs-logs-raw.d.ts +0 -45
- package/tools/logs/raw/logs-logs-raw.d.ts.map +0 -1
- package/tools/logs/raw/logs-logs-raw.js +0 -565
- package/tools/logs/raw/logs-logs-raw.js.map +0 -1
- package/tools/logs/raw/logs-logs-raw.mjs +0 -558
- package/tools/logs/raw/logs-logs-raw.mjs.map +0 -1
- package/tools/organizations/categories/assets-organizations-categories.d.mts +0 -45
- package/tools/organizations/categories/assets-organizations-categories.d.mts.map +0 -1
- package/tools/organizations/categories/assets-organizations-categories.d.ts +0 -45
- package/tools/organizations/categories/assets-organizations-categories.d.ts.map +0 -1
- package/tools/organizations/categories/assets-organizations-categories.js +0 -55
- package/tools/organizations/categories/assets-organizations-categories.js.map +0 -1
- package/tools/organizations/categories/assets-organizations-categories.mjs +0 -48
- package/tools/organizations/categories/assets-organizations-categories.mjs.map +0 -1
- package/tools/organizations/categories/list-organizations-categories.d.mts +0 -45
- package/tools/organizations/categories/list-organizations-categories.d.mts.map +0 -1
- package/tools/organizations/categories/list-organizations-categories.d.ts +0 -45
- package/tools/organizations/categories/list-organizations-categories.d.ts.map +0 -1
- package/tools/organizations/categories/list-organizations-categories.js +0 -51
- package/tools/organizations/categories/list-organizations-categories.js.map +0 -1
- package/tools/organizations/categories/list-organizations-categories.mjs +0 -44
- package/tools/organizations/categories/list-organizations-categories.mjs.map +0 -1
- package/tools/organizations/categories/prompts-organizations-categories.d.mts +0 -45
- package/tools/organizations/categories/prompts-organizations-categories.d.mts.map +0 -1
- package/tools/organizations/categories/prompts-organizations-categories.d.ts +0 -45
- package/tools/organizations/categories/prompts-organizations-categories.d.ts.map +0 -1
- package/tools/organizations/categories/prompts-organizations-categories.js +0 -55
- package/tools/organizations/categories/prompts-organizations-categories.js.map +0 -1
- package/tools/organizations/categories/prompts-organizations-categories.mjs +0 -48
- package/tools/organizations/categories/prompts-organizations-categories.mjs.map +0 -1
- package/tools/organizations/categories/tags-organizations-categories.d.mts +0 -45
- package/tools/organizations/categories/tags-organizations-categories.d.mts.map +0 -1
- package/tools/organizations/categories/tags-organizations-categories.d.ts +0 -45
- package/tools/organizations/categories/tags-organizations-categories.d.ts.map +0 -1
- package/tools/organizations/categories/tags-organizations-categories.js +0 -55
- package/tools/organizations/categories/tags-organizations-categories.js.map +0 -1
- package/tools/organizations/categories/tags-organizations-categories.mjs +0 -48
- package/tools/organizations/categories/tags-organizations-categories.mjs.map +0 -1
- package/tools/organizations/categories/topics-organizations-categories.d.mts +0 -45
- package/tools/organizations/categories/topics-organizations-categories.d.mts.map +0 -1
- package/tools/organizations/categories/topics-organizations-categories.d.ts +0 -45
- package/tools/organizations/categories/topics-organizations-categories.d.ts.map +0 -1
- package/tools/organizations/categories/topics-organizations-categories.js +0 -55
- package/tools/organizations/categories/topics-organizations-categories.js.map +0 -1
- package/tools/organizations/categories/topics-organizations-categories.mjs +0 -48
- package/tools/organizations/categories/topics-organizations-categories.mjs.map +0 -1
- package/tools/organizations/domains-organizations.d.mts +0 -45
- package/tools/organizations/domains-organizations.d.mts.map +0 -1
- package/tools/organizations/domains-organizations.d.ts +0 -45
- package/tools/organizations/domains-organizations.d.ts.map +0 -1
- package/tools/organizations/domains-organizations.js +0 -51
- package/tools/organizations/domains-organizations.js.map +0 -1
- package/tools/organizations/domains-organizations.mjs +0 -44
- package/tools/organizations/domains-organizations.mjs.map +0 -1
- package/tools/organizations/list-assets-organizations.d.mts +0 -45
- package/tools/organizations/list-assets-organizations.d.mts.map +0 -1
- package/tools/organizations/list-assets-organizations.d.ts +0 -45
- package/tools/organizations/list-assets-organizations.d.ts.map +0 -1
- package/tools/organizations/list-assets-organizations.js +0 -51
- package/tools/organizations/list-assets-organizations.js.map +0 -1
- package/tools/organizations/list-assets-organizations.mjs +0 -44
- package/tools/organizations/list-assets-organizations.mjs.map +0 -1
- package/tools/organizations/models-organizations.d.mts +0 -45
- package/tools/organizations/models-organizations.d.mts.map +0 -1
- package/tools/organizations/models-organizations.d.ts +0 -45
- package/tools/organizations/models-organizations.d.ts.map +0 -1
- package/tools/organizations/models-organizations.js +0 -51
- package/tools/organizations/models-organizations.js.map +0 -1
- package/tools/organizations/models-organizations.mjs +0 -44
- package/tools/organizations/models-organizations.mjs.map +0 -1
- package/tools/organizations/regions-organizations.d.mts +0 -45
- package/tools/organizations/regions-organizations.d.mts.map +0 -1
- package/tools/organizations/regions-organizations.d.ts +0 -45
- package/tools/organizations/regions-organizations.d.ts.map +0 -1
- package/tools/organizations/regions-organizations.js +0 -51
- package/tools/organizations/regions-organizations.js.map +0 -1
- package/tools/organizations/regions-organizations.mjs +0 -44
- package/tools/organizations/regions-organizations.mjs.map +0 -1
- package/tools/prompts/answers-prompts.d.mts +0 -45
- package/tools/prompts/answers-prompts.d.mts.map +0 -1
- package/tools/prompts/answers-prompts.d.ts +0 -45
- package/tools/prompts/answers-prompts.d.ts.map +0 -1
- package/tools/prompts/answers-prompts.js +0 -372
- package/tools/prompts/answers-prompts.js.map +0 -1
- package/tools/prompts/answers-prompts.mjs +0 -365
- package/tools/prompts/answers-prompts.mjs.map +0 -1
- package/tools/reports/citations-reports.d.mts +0 -45
- package/tools/reports/citations-reports.d.mts.map +0 -1
- package/tools/reports/citations-reports.d.ts +0 -45
- package/tools/reports/citations-reports.d.ts.map +0 -1
- package/tools/reports/citations-reports.js +0 -503
- package/tools/reports/citations-reports.js.map +0 -1
- package/tools/reports/citations-reports.mjs +0 -496
- package/tools/reports/citations-reports.mjs.map +0 -1
- package/tools/reports/sentiment-reports.d.mts +0 -45
- package/tools/reports/sentiment-reports.d.mts.map +0 -1
- package/tools/reports/sentiment-reports.d.ts +0 -45
- package/tools/reports/sentiment-reports.d.ts.map +0 -1
- package/tools/reports/sentiment-reports.js +0 -417
- package/tools/reports/sentiment-reports.js.map +0 -1
- package/tools/reports/sentiment-reports.mjs +0 -410
- package/tools/reports/sentiment-reports.mjs.map +0 -1
- package/tools/reports/visibility-reports.d.mts +0 -45
- package/tools/reports/visibility-reports.d.mts.map +0 -1
- package/tools/reports/visibility-reports.d.ts +0 -45
- package/tools/reports/visibility-reports.d.ts.map +0 -1
- package/tools/reports/visibility-reports.js +0 -363
- package/tools/reports/visibility-reports.js.map +0 -1
- package/tools/reports/visibility-reports.mjs +0 -356
- package/tools/reports/visibility-reports.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
- /package/{tools/types.js → types.js} +0 -0
- /package/{tools/types.mjs → types.mjs} +0 -0
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { Metadata, asErrorResult, asTextContentResult } from 'profound-mcp/tools/types';
|
|
4
|
-
|
|
5
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import Profound from 'profoundai';
|
|
7
|
-
|
|
8
|
-
export const metadata: Metadata = {
|
|
9
|
-
resource: 'reports',
|
|
10
|
-
operation: 'write',
|
|
11
|
-
tags: [],
|
|
12
|
-
httpMethod: 'post',
|
|
13
|
-
httpPath: '/v1/reports/visibility',
|
|
14
|
-
operationId: 'query_visibility_v1_reports_visibility_post',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const tool: Tool = {
|
|
18
|
-
name: 'visibility_reports',
|
|
19
|
-
description: 'Query visibility report.',
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
category_id: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
title: 'Category Id',
|
|
26
|
-
},
|
|
27
|
-
end_date: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
title: 'End Date',
|
|
30
|
-
description:
|
|
31
|
-
'End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
32
|
-
format: 'date-time',
|
|
33
|
-
},
|
|
34
|
-
metrics: {
|
|
35
|
-
type: 'array',
|
|
36
|
-
title: 'Metrics',
|
|
37
|
-
items: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
enum: ['share_of_voice', 'mentions_count', 'visibility_score', 'executions'],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
start_date: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
title: 'Start Date',
|
|
45
|
-
description:
|
|
46
|
-
'Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.',
|
|
47
|
-
format: 'date-time',
|
|
48
|
-
},
|
|
49
|
-
date_interval: {
|
|
50
|
-
type: 'string',
|
|
51
|
-
title: 'Date Interval',
|
|
52
|
-
description: 'Date interval for the report. (only used with date dimension)',
|
|
53
|
-
enum: ['day', 'week', 'month', 'year'],
|
|
54
|
-
},
|
|
55
|
-
dimensions: {
|
|
56
|
-
type: 'array',
|
|
57
|
-
title: 'Dimensions',
|
|
58
|
-
description: 'Dimensions to group the report by.',
|
|
59
|
-
items: {
|
|
60
|
-
type: 'string',
|
|
61
|
-
enum: ['date', 'region', 'topic', 'model', 'asset_id', 'asset_name', 'prompt', 'tag', 'persona'],
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
filters: {
|
|
65
|
-
type: 'array',
|
|
66
|
-
title: 'Filters',
|
|
67
|
-
description: 'List of filters to apply to the visibility report.',
|
|
68
|
-
items: {
|
|
69
|
-
anyOf: [
|
|
70
|
-
{
|
|
71
|
-
type: 'object',
|
|
72
|
-
title: 'RegionIdFilter',
|
|
73
|
-
properties: {
|
|
74
|
-
field: {
|
|
75
|
-
type: 'string',
|
|
76
|
-
title: 'Field',
|
|
77
|
-
description: '- `region` - Deprecated',
|
|
78
|
-
enum: ['region_id', 'region'],
|
|
79
|
-
},
|
|
80
|
-
operator: {
|
|
81
|
-
type: 'string',
|
|
82
|
-
title: 'Operator',
|
|
83
|
-
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
84
|
-
},
|
|
85
|
-
value: {
|
|
86
|
-
anyOf: [
|
|
87
|
-
{
|
|
88
|
-
type: 'string',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: 'array',
|
|
92
|
-
items: {
|
|
93
|
-
type: 'string',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
title: 'Value',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
required: ['field', 'operator', 'value'],
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'object',
|
|
104
|
-
title: 'ModelIdFilter',
|
|
105
|
-
properties: {
|
|
106
|
-
field: {
|
|
107
|
-
type: 'string',
|
|
108
|
-
title: 'Field',
|
|
109
|
-
description: '- `model` - Deprecated',
|
|
110
|
-
enum: ['model_id', 'model'],
|
|
111
|
-
},
|
|
112
|
-
operator: {
|
|
113
|
-
type: 'string',
|
|
114
|
-
title: 'Operator',
|
|
115
|
-
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
116
|
-
},
|
|
117
|
-
value: {
|
|
118
|
-
anyOf: [
|
|
119
|
-
{
|
|
120
|
-
type: 'string',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
type: 'array',
|
|
124
|
-
items: {
|
|
125
|
-
type: 'string',
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
title: 'Value',
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
required: ['field', 'operator', 'value'],
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
type: 'object',
|
|
136
|
-
title: 'TopicIdFilter',
|
|
137
|
-
properties: {
|
|
138
|
-
field: {
|
|
139
|
-
type: 'string',
|
|
140
|
-
title: 'Field',
|
|
141
|
-
description: '- `topic` - Deprecated',
|
|
142
|
-
enum: ['topic_id', 'topic'],
|
|
143
|
-
},
|
|
144
|
-
operator: {
|
|
145
|
-
type: 'string',
|
|
146
|
-
title: 'Operator',
|
|
147
|
-
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
148
|
-
},
|
|
149
|
-
value: {
|
|
150
|
-
anyOf: [
|
|
151
|
-
{
|
|
152
|
-
type: 'string',
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
type: 'array',
|
|
156
|
-
items: {
|
|
157
|
-
type: 'string',
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
title: 'Value',
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
required: ['field', 'operator', 'value'],
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
type: 'object',
|
|
168
|
-
title: 'AssetNameFilter',
|
|
169
|
-
description: 'Filter by asset name',
|
|
170
|
-
properties: {
|
|
171
|
-
field: {
|
|
172
|
-
type: 'string',
|
|
173
|
-
title: 'Field',
|
|
174
|
-
enum: ['asset_name'],
|
|
175
|
-
},
|
|
176
|
-
operator: {
|
|
177
|
-
type: 'string',
|
|
178
|
-
title: 'Operator',
|
|
179
|
-
enum: [
|
|
180
|
-
'is',
|
|
181
|
-
'not_is',
|
|
182
|
-
'in',
|
|
183
|
-
'not_in',
|
|
184
|
-
'contains',
|
|
185
|
-
'not_contains',
|
|
186
|
-
'matches',
|
|
187
|
-
'contains_case_insensitive',
|
|
188
|
-
'not_contains_case_insensitive',
|
|
189
|
-
],
|
|
190
|
-
},
|
|
191
|
-
value: {
|
|
192
|
-
anyOf: [
|
|
193
|
-
{
|
|
194
|
-
type: 'string',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type: 'array',
|
|
198
|
-
items: {
|
|
199
|
-
type: 'string',
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
title: 'Value',
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
required: ['field', 'operator', 'value'],
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: 'object',
|
|
210
|
-
title: 'TagIdFilter',
|
|
211
|
-
properties: {
|
|
212
|
-
field: {
|
|
213
|
-
type: 'string',
|
|
214
|
-
title: 'Field',
|
|
215
|
-
description: '- `tag` - Deprecated',
|
|
216
|
-
enum: ['tag_id', 'tag'],
|
|
217
|
-
},
|
|
218
|
-
operator: {
|
|
219
|
-
type: 'string',
|
|
220
|
-
title: 'Operator',
|
|
221
|
-
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
222
|
-
},
|
|
223
|
-
value: {
|
|
224
|
-
anyOf: [
|
|
225
|
-
{
|
|
226
|
-
type: 'string',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
type: 'array',
|
|
230
|
-
items: {
|
|
231
|
-
type: 'string',
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
title: 'Value',
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
required: ['field', 'operator', 'value'],
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
type: 'object',
|
|
242
|
-
title: 'PromptFilter',
|
|
243
|
-
description: 'Filter by prompt text',
|
|
244
|
-
properties: {
|
|
245
|
-
field: {
|
|
246
|
-
type: 'string',
|
|
247
|
-
title: 'Field',
|
|
248
|
-
enum: ['prompt'],
|
|
249
|
-
},
|
|
250
|
-
operator: {
|
|
251
|
-
type: 'string',
|
|
252
|
-
title: 'Operator',
|
|
253
|
-
enum: [
|
|
254
|
-
'is',
|
|
255
|
-
'not_is',
|
|
256
|
-
'in',
|
|
257
|
-
'not_in',
|
|
258
|
-
'contains',
|
|
259
|
-
'not_contains',
|
|
260
|
-
'matches',
|
|
261
|
-
'contains_case_insensitive',
|
|
262
|
-
'not_contains_case_insensitive',
|
|
263
|
-
],
|
|
264
|
-
},
|
|
265
|
-
value: {
|
|
266
|
-
anyOf: [
|
|
267
|
-
{
|
|
268
|
-
type: 'string',
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
type: 'array',
|
|
272
|
-
items: {
|
|
273
|
-
type: 'string',
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
title: 'Value',
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
required: ['field', 'operator', 'value'],
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
type: 'object',
|
|
284
|
-
title: 'PersonaIdFilter',
|
|
285
|
-
properties: {
|
|
286
|
-
field: {
|
|
287
|
-
type: 'string',
|
|
288
|
-
title: 'Field',
|
|
289
|
-
enum: ['persona_id'],
|
|
290
|
-
},
|
|
291
|
-
operator: {
|
|
292
|
-
type: 'string',
|
|
293
|
-
title: 'Operator',
|
|
294
|
-
enum: ['is', 'not_is', 'in', 'not_in'],
|
|
295
|
-
},
|
|
296
|
-
value: {
|
|
297
|
-
anyOf: [
|
|
298
|
-
{
|
|
299
|
-
type: 'string',
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
type: 'array',
|
|
303
|
-
items: {
|
|
304
|
-
type: 'string',
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
],
|
|
308
|
-
title: 'Value',
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
required: ['field', 'operator', 'value'],
|
|
312
|
-
},
|
|
313
|
-
],
|
|
314
|
-
description: 'Filter by asset name',
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
order_by: {
|
|
318
|
-
type: 'object',
|
|
319
|
-
title: 'Order By',
|
|
320
|
-
description:
|
|
321
|
-
"\nCustom ordering of the report results.\n\nThe order is a record of key-value pairs where:\n- key is the field to order by, which can be a metric or dimension\n- value is the direction of the order, either 'asc' for ascending or 'desc' for descending.\n\nWhen not specified, the default order is the first metric in the query descending.\n ",
|
|
322
|
-
additionalProperties: true,
|
|
323
|
-
},
|
|
324
|
-
pagination: {
|
|
325
|
-
$ref: '#/$defs/pagination',
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
|
-
required: ['category_id', 'end_date', 'metrics', 'start_date'],
|
|
329
|
-
$defs: {
|
|
330
|
-
pagination: {
|
|
331
|
-
type: 'object',
|
|
332
|
-
title: 'Pagination',
|
|
333
|
-
description: 'Report pagination model.',
|
|
334
|
-
properties: {
|
|
335
|
-
limit: {
|
|
336
|
-
type: 'integer',
|
|
337
|
-
title: 'Limit',
|
|
338
|
-
description: 'Maximum number of results to return. Default is 10,000, maximum is 50,000.',
|
|
339
|
-
},
|
|
340
|
-
offset: {
|
|
341
|
-
type: 'integer',
|
|
342
|
-
title: 'Offset',
|
|
343
|
-
description: 'Offset for the results. Used for pagination.',
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
annotations: {},
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
export const handler = async (client: Profound, args: Record<string, unknown> | undefined) => {
|
|
353
|
-
const body = args as any;
|
|
354
|
-
try {
|
|
355
|
-
return asTextContentResult(await client.reports.visibility(body));
|
|
356
|
-
} catch (error) {
|
|
357
|
-
if (error instanceof Profound.APIError) {
|
|
358
|
-
return asErrorResult(error.message);
|
|
359
|
-
}
|
|
360
|
-
throw error;
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
export default { metadata, tool, handler };
|
package/src/tools.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './tools/index';
|
package/tools/index.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Metadata, Endpoint, HandlerFunction } from "./types.mjs";
|
|
2
|
-
export { Metadata, Endpoint, HandlerFunction };
|
|
3
|
-
export declare const endpoints: Endpoint[];
|
|
4
|
-
export type Filter = {
|
|
5
|
-
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
6
|
-
op: 'include' | 'exclude';
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[];
|
|
10
|
-
//# sourceMappingURL=index.d.mts.map
|
package/tools/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE;AAE9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AAkB/C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AAsBxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA4B1E"}
|
package/tools/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Metadata, Endpoint, HandlerFunction } from "./types.js";
|
|
2
|
-
export { Metadata, Endpoint, HandlerFunction };
|
|
3
|
-
export declare const endpoints: Endpoint[];
|
|
4
|
-
export type Filter = {
|
|
5
|
-
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
6
|
-
op: 'include' | 'exclude';
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[];
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/tools/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE;AAE9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AAkB/C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AAsBxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA4B1E"}
|
package/tools/index.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.endpoints = void 0;
|
|
8
|
-
exports.query = query;
|
|
9
|
-
const domains_organizations_1 = __importDefault(require("./organizations/domains-organizations.js"));
|
|
10
|
-
const list_assets_organizations_1 = __importDefault(require("./organizations/list-assets-organizations.js"));
|
|
11
|
-
const models_organizations_1 = __importDefault(require("./organizations/models-organizations.js"));
|
|
12
|
-
const regions_organizations_1 = __importDefault(require("./organizations/regions-organizations.js"));
|
|
13
|
-
const list_organizations_categories_1 = __importDefault(require("./organizations/categories/list-organizations-categories.js"));
|
|
14
|
-
const assets_organizations_categories_1 = __importDefault(require("./organizations/categories/assets-organizations-categories.js"));
|
|
15
|
-
const prompts_organizations_categories_1 = __importDefault(require("./organizations/categories/prompts-organizations-categories.js"));
|
|
16
|
-
const tags_organizations_categories_1 = __importDefault(require("./organizations/categories/tags-organizations-categories.js"));
|
|
17
|
-
const topics_organizations_categories_1 = __importDefault(require("./organizations/categories/topics-organizations-categories.js"));
|
|
18
|
-
const answers_prompts_1 = __importDefault(require("./prompts/answers-prompts.js"));
|
|
19
|
-
const citations_reports_1 = __importDefault(require("./reports/citations-reports.js"));
|
|
20
|
-
const sentiment_reports_1 = __importDefault(require("./reports/sentiment-reports.js"));
|
|
21
|
-
const visibility_reports_1 = __importDefault(require("./reports/visibility-reports.js"));
|
|
22
|
-
const bots_logs_raw_1 = __importDefault(require("./logs/raw/bots-logs-raw.js"));
|
|
23
|
-
const logs_logs_raw_1 = __importDefault(require("./logs/raw/logs-logs-raw.js"));
|
|
24
|
-
exports.endpoints = [];
|
|
25
|
-
function addEndpoint(endpoint) {
|
|
26
|
-
exports.endpoints.push(endpoint);
|
|
27
|
-
}
|
|
28
|
-
addEndpoint(domains_organizations_1.default);
|
|
29
|
-
addEndpoint(list_assets_organizations_1.default);
|
|
30
|
-
addEndpoint(models_organizations_1.default);
|
|
31
|
-
addEndpoint(regions_organizations_1.default);
|
|
32
|
-
addEndpoint(list_organizations_categories_1.default);
|
|
33
|
-
addEndpoint(assets_organizations_categories_1.default);
|
|
34
|
-
addEndpoint(prompts_organizations_categories_1.default);
|
|
35
|
-
addEndpoint(tags_organizations_categories_1.default);
|
|
36
|
-
addEndpoint(topics_organizations_categories_1.default);
|
|
37
|
-
addEndpoint(answers_prompts_1.default);
|
|
38
|
-
addEndpoint(citations_reports_1.default);
|
|
39
|
-
addEndpoint(sentiment_reports_1.default);
|
|
40
|
-
addEndpoint(visibility_reports_1.default);
|
|
41
|
-
addEndpoint(bots_logs_raw_1.default);
|
|
42
|
-
addEndpoint(logs_logs_raw_1.default);
|
|
43
|
-
function query(filters, endpoints) {
|
|
44
|
-
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
45
|
-
const unmatchedFilters = new Set(filters);
|
|
46
|
-
const filtered = endpoints.filter((endpoint) => {
|
|
47
|
-
let included = false || allExcludes;
|
|
48
|
-
for (const filter of filters) {
|
|
49
|
-
if (match(filter, endpoint)) {
|
|
50
|
-
unmatchedFilters.delete(filter);
|
|
51
|
-
included = filter.op === 'include';
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return included;
|
|
55
|
-
});
|
|
56
|
-
// Check if any filters didn't match
|
|
57
|
-
const unmatched = Array.from(unmatchedFilters).filter((f) => f.type === 'tool' || f.type === 'resource');
|
|
58
|
-
if (unmatched.length > 0) {
|
|
59
|
-
throw new Error(`The following filters did not match any endpoints: ${unmatched
|
|
60
|
-
.map((f) => `${f.type}=${f.value}`)
|
|
61
|
-
.join(', ')}`);
|
|
62
|
-
}
|
|
63
|
-
return filtered;
|
|
64
|
-
}
|
|
65
|
-
function match({ type, value }, endpoint) {
|
|
66
|
-
switch (type) {
|
|
67
|
-
case 'resource': {
|
|
68
|
-
const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
|
|
69
|
-
const regex = new RegExp(regexStr);
|
|
70
|
-
return regex.test(normalizeResource(endpoint.metadata.resource));
|
|
71
|
-
}
|
|
72
|
-
case 'operation':
|
|
73
|
-
return endpoint.metadata.operation === value;
|
|
74
|
-
case 'tag':
|
|
75
|
-
return endpoint.metadata.tags.includes(value);
|
|
76
|
-
case 'tool':
|
|
77
|
-
return endpoint.tool.name === value;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function normalizeResource(resource) {
|
|
81
|
-
return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=index.js.map
|
package/tools/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAkDtF,sBA4BC;AAxED,qGAA0E;AAC1E,6GAAkF;AAClF,mGAAwE;AACxE,qGAA0E;AAC1E,gIAAqG;AACrG,oIAAyG;AACzG,sIAA2G;AAC3G,gIAAqG;AACrG,oIAAyG;AACzG,mFAAwD;AACxD,uFAA4D;AAC5D,uFAA4D;AAC5D,yFAA8D;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AAK;YACR,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;IACxC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
package/tools/index.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import domains_organizations from "./organizations/domains-organizations.mjs";
|
|
3
|
-
import list_assets_organizations from "./organizations/list-assets-organizations.mjs";
|
|
4
|
-
import models_organizations from "./organizations/models-organizations.mjs";
|
|
5
|
-
import regions_organizations from "./organizations/regions-organizations.mjs";
|
|
6
|
-
import list_organizations_categories from "./organizations/categories/list-organizations-categories.mjs";
|
|
7
|
-
import assets_organizations_categories from "./organizations/categories/assets-organizations-categories.mjs";
|
|
8
|
-
import prompts_organizations_categories from "./organizations/categories/prompts-organizations-categories.mjs";
|
|
9
|
-
import tags_organizations_categories from "./organizations/categories/tags-organizations-categories.mjs";
|
|
10
|
-
import topics_organizations_categories from "./organizations/categories/topics-organizations-categories.mjs";
|
|
11
|
-
import answers_prompts from "./prompts/answers-prompts.mjs";
|
|
12
|
-
import citations_reports from "./reports/citations-reports.mjs";
|
|
13
|
-
import sentiment_reports from "./reports/sentiment-reports.mjs";
|
|
14
|
-
import visibility_reports from "./reports/visibility-reports.mjs";
|
|
15
|
-
import bots_logs_raw from "./logs/raw/bots-logs-raw.mjs";
|
|
16
|
-
import logs_logs_raw from "./logs/raw/logs-logs-raw.mjs";
|
|
17
|
-
export const endpoints = [];
|
|
18
|
-
function addEndpoint(endpoint) {
|
|
19
|
-
endpoints.push(endpoint);
|
|
20
|
-
}
|
|
21
|
-
addEndpoint(domains_organizations);
|
|
22
|
-
addEndpoint(list_assets_organizations);
|
|
23
|
-
addEndpoint(models_organizations);
|
|
24
|
-
addEndpoint(regions_organizations);
|
|
25
|
-
addEndpoint(list_organizations_categories);
|
|
26
|
-
addEndpoint(assets_organizations_categories);
|
|
27
|
-
addEndpoint(prompts_organizations_categories);
|
|
28
|
-
addEndpoint(tags_organizations_categories);
|
|
29
|
-
addEndpoint(topics_organizations_categories);
|
|
30
|
-
addEndpoint(answers_prompts);
|
|
31
|
-
addEndpoint(citations_reports);
|
|
32
|
-
addEndpoint(sentiment_reports);
|
|
33
|
-
addEndpoint(visibility_reports);
|
|
34
|
-
addEndpoint(bots_logs_raw);
|
|
35
|
-
addEndpoint(logs_logs_raw);
|
|
36
|
-
export function query(filters, endpoints) {
|
|
37
|
-
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
38
|
-
const unmatchedFilters = new Set(filters);
|
|
39
|
-
const filtered = endpoints.filter((endpoint) => {
|
|
40
|
-
let included = false || allExcludes;
|
|
41
|
-
for (const filter of filters) {
|
|
42
|
-
if (match(filter, endpoint)) {
|
|
43
|
-
unmatchedFilters.delete(filter);
|
|
44
|
-
included = filter.op === 'include';
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return included;
|
|
48
|
-
});
|
|
49
|
-
// Check if any filters didn't match
|
|
50
|
-
const unmatched = Array.from(unmatchedFilters).filter((f) => f.type === 'tool' || f.type === 'resource');
|
|
51
|
-
if (unmatched.length > 0) {
|
|
52
|
-
throw new Error(`The following filters did not match any endpoints: ${unmatched
|
|
53
|
-
.map((f) => `${f.type}=${f.value}`)
|
|
54
|
-
.join(', ')}`);
|
|
55
|
-
}
|
|
56
|
-
return filtered;
|
|
57
|
-
}
|
|
58
|
-
function match({ type, value }, endpoint) {
|
|
59
|
-
switch (type) {
|
|
60
|
-
case 'resource': {
|
|
61
|
-
const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
|
|
62
|
-
const regex = new RegExp(regexStr);
|
|
63
|
-
return regex.test(normalizeResource(endpoint.metadata.resource));
|
|
64
|
-
}
|
|
65
|
-
case 'operation':
|
|
66
|
-
return endpoint.metadata.operation === value;
|
|
67
|
-
case 'tag':
|
|
68
|
-
return endpoint.metadata.tags.includes(value);
|
|
69
|
-
case 'tool':
|
|
70
|
-
return endpoint.tool.name === value;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function normalizeResource(resource) {
|
|
74
|
-
return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=index.mjs.map
|
package/tools/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAM/E,qBAAqB;OACrB,yBAAyB;OACzB,oBAAoB;OACpB,qBAAqB;OACrB,6BAA6B;OAC7B,+BAA+B;OAC/B,gCAAgC;OAChC,6BAA6B;OAC7B,+BAA+B;OAC/B,eAAe;OACf,iBAAiB;OACjB,iBAAiB;OACjB,kBAAkB;OAClB,aAAa;OACb,aAAa;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAe,EAAE,CAAC;AAExC,SAAS,WAAW,CAAC,QAAkB;IACrC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED,WAAW,CAAC,qBAAqB,CAAC,CAAC;AACnC,WAAW,CAAC,yBAAyB,CAAC,CAAC;AACvC,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAClC,WAAW,CAAC,qBAAqB,CAAC,CAAC;AACnC,WAAW,CAAC,6BAA6B,CAAC,CAAC;AAC3C,WAAW,CAAC,+BAA+B,CAAC,CAAC;AAC7C,WAAW,CAAC,gCAAgC,CAAC,CAAC;AAC9C,WAAW,CAAC,6BAA6B,CAAC,CAAC;AAC3C,WAAW,CAAC,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AsD,SAAS;aAC5D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;aAClC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAU,EAAE,QAAkB;IACxD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,QAAQ,GAAG,GAAG,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,KAAK,WAAW;YACd,OAAO,QAAQ,CAAC,QAAQ,CAAC,SAAS,KAAK,KAAK,CAAC;QAC/C,KAAK,KAAK;YACR,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;IACxC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Metadata } from 'profound-mcp/tools/types';
|
|
2
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import Profound from 'profoundai';
|
|
4
|
-
export declare const metadata: Metadata;
|
|
5
|
-
export declare const tool: Tool;
|
|
6
|
-
export declare const handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
metadata: Metadata;
|
|
9
|
-
tool: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
name: string;
|
|
12
|
-
inputSchema: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
type: "object";
|
|
15
|
-
properties?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
required?: string[] | undefined;
|
|
19
|
-
};
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
outputSchema?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
type: "object";
|
|
25
|
-
properties?: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} | undefined;
|
|
28
|
-
required?: string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
annotations?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
readOnlyHint?: boolean | undefined;
|
|
34
|
-
destructiveHint?: boolean | undefined;
|
|
35
|
-
idempotentHint?: boolean | undefined;
|
|
36
|
-
openWorldHint?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
_meta?: {
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
} | undefined;
|
|
41
|
-
};
|
|
42
|
-
handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
43
|
-
};
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=bots-logs-raw.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bots-logs-raw.d.mts","sourceRoot":"","sources":["../../../src/tools/logs/raw/bots-logs-raw.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAigBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Metadata } from 'profound-mcp/tools/types';
|
|
2
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import Profound from 'profoundai';
|
|
4
|
-
export declare const metadata: Metadata;
|
|
5
|
-
export declare const tool: Tool;
|
|
6
|
-
export declare const handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
metadata: Metadata;
|
|
9
|
-
tool: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
name: string;
|
|
12
|
-
inputSchema: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
type: "object";
|
|
15
|
-
properties?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
required?: string[] | undefined;
|
|
19
|
-
};
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
outputSchema?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
type: "object";
|
|
25
|
-
properties?: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} | undefined;
|
|
28
|
-
required?: string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
annotations?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
readOnlyHint?: boolean | undefined;
|
|
34
|
-
destructiveHint?: boolean | undefined;
|
|
35
|
-
idempotentHint?: boolean | undefined;
|
|
36
|
-
openWorldHint?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
_meta?: {
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
} | undefined;
|
|
41
|
-
};
|
|
42
|
-
handler: (client: Profound, args: Record<string, unknown> | undefined) => Promise<import("profound-mcp/tools/types").ToolCallResult>;
|
|
43
|
-
};
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=bots-logs-raw.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bots-logs-raw.d.ts","sourceRoot":"","sources":["../../../src/tools/logs/raw/bots-logs-raw.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAsC,MAAM,0BAA0B;OAEhF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,YAAY;AAEjC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAigBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+DAUxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAVoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAYzF,wBAA2C"}
|