@rnsk/toolkits 0.0.9 → 0.0.11
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 +18 -2
- package/dist/index.d.ts +17 -1
- package/dist/index.js +33 -1
- package/dist/toolkits/bitbucket/tools/index.d.ts +5 -5
- package/dist/toolkits/bitbucket/tools/reports.d.ts +5 -5
- package/dist/toolkits/cloudflare/tools/create-list.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/create-zone.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/index.d.ts +4 -4
- package/dist/toolkits/cloudflare/tools/list-pools.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/list-zones.d.ts +1 -1
- package/dist/toolkits/convex/icon.d.ts +5 -0
- package/dist/toolkits/convex/icon.js +10 -0
- package/dist/toolkits/convex/manifest.d.ts +3 -0
- package/dist/toolkits/convex/manifest.js +33 -0
- package/dist/toolkits/convex/tools/client.d.ts +28 -0
- package/dist/toolkits/convex/tools/client.js +85 -0
- package/dist/toolkits/convex/tools/deploy-keys.d.ts +10 -0
- package/dist/toolkits/convex/tools/deploy-keys.js +46 -0
- package/dist/toolkits/convex/tools/deployments.d.ts +35 -0
- package/dist/toolkits/convex/tools/deployments.js +126 -0
- package/dist/toolkits/convex/tools/domains.d.ts +7 -0
- package/dist/toolkits/convex/tools/domains.js +29 -0
- package/dist/toolkits/convex/tools/functions.d.ts +14 -0
- package/dist/toolkits/convex/tools/functions.js +49 -0
- package/dist/toolkits/convex/tools/index.d.ts +176 -0
- package/dist/toolkits/convex/tools/index.js +145 -0
- package/dist/toolkits/convex/tools/logging.d.ts +5 -0
- package/dist/toolkits/convex/tools/logging.js +25 -0
- package/dist/toolkits/convex/tools/projects.d.ts +31 -0
- package/dist/toolkits/convex/tools/projects.js +111 -0
- package/dist/toolkits/convex/tools/teams.d.ts +12 -0
- package/dist/toolkits/convex/tools/teams.js +62 -0
- package/dist/toolkits/datadog/icon.d.ts +5 -0
- package/dist/toolkits/datadog/icon.js +6 -0
- package/dist/toolkits/datadog/manifest.d.ts +3 -0
- package/dist/toolkits/datadog/manifest.js +44 -0
- package/dist/toolkits/datadog/tools/api-keys.d.ts +21 -0
- package/dist/toolkits/datadog/tools/api-keys.js +42 -0
- package/dist/toolkits/datadog/tools/apm.d.ts +51 -0
- package/dist/toolkits/datadog/tools/apm.js +106 -0
- package/dist/toolkits/datadog/tools/client.d.ts +19 -0
- package/dist/toolkits/datadog/tools/client.js +81 -0
- package/dist/toolkits/datadog/tools/dashboards.d.ts +93 -0
- package/dist/toolkits/datadog/tools/dashboards.js +127 -0
- package/dist/toolkits/datadog/tools/events.d.ts +35 -0
- package/dist/toolkits/datadog/tools/events.js +56 -0
- package/dist/toolkits/datadog/tools/hosts.d.ts +49 -0
- package/dist/toolkits/datadog/tools/hosts.js +87 -0
- package/dist/toolkits/datadog/tools/incidents.d.ts +18 -0
- package/dist/toolkits/datadog/tools/incidents.js +34 -0
- package/dist/toolkits/datadog/tools/index.d.ts +999 -0
- package/dist/toolkits/datadog/tools/index.js +450 -0
- package/dist/toolkits/datadog/tools/integrations.d.ts +32 -0
- package/dist/toolkits/datadog/tools/integrations.js +47 -0
- package/dist/toolkits/datadog/tools/logs.d.ts +39 -0
- package/dist/toolkits/datadog/tools/logs.js +121 -0
- package/dist/toolkits/datadog/tools/metrics.d.ts +27 -0
- package/dist/toolkits/datadog/tools/metrics.js +83 -0
- package/dist/toolkits/datadog/tools/monitors.d.ts +95 -0
- package/dist/toolkits/datadog/tools/monitors.js +190 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.d.ts +61 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.js +155 -0
- package/dist/toolkits/datadog/tools/oncall-policies.d.ts +28 -0
- package/dist/toolkits/datadog/tools/oncall-policies.js +72 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.d.ts +31 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.js +87 -0
- package/dist/toolkits/datadog/tools/oncall-teams.d.ts +14 -0
- package/dist/toolkits/datadog/tools/oncall-teams.js +54 -0
- package/dist/toolkits/datadog/tools/slos.d.ts +43 -0
- package/dist/toolkits/datadog/tools/slos.js +62 -0
- package/dist/toolkits/datadog/tools/synthetics.d.ts +58 -0
- package/dist/toolkits/datadog/tools/synthetics.js +90 -0
- package/dist/toolkits/datadog/tools/usage.d.ts +7 -0
- package/dist/toolkits/datadog/tools/usage.js +25 -0
- package/dist/toolkits/datadog/tools/users.d.ts +35 -0
- package/dist/toolkits/datadog/tools/users.js +66 -0
- package/dist/toolkits/dev-to/icon.d.ts +5 -0
- package/dist/toolkits/dev-to/icon.js +10 -0
- package/dist/toolkits/dev-to/manifest.d.ts +3 -0
- package/dist/toolkits/dev-to/manifest.js +34 -0
- package/dist/toolkits/dev-to/tools/articles.d.ts +78 -0
- package/dist/toolkits/dev-to/tools/articles.js +262 -0
- package/dist/toolkits/dev-to/tools/client.d.ts +25 -0
- package/dist/toolkits/dev-to/tools/client.js +65 -0
- package/dist/toolkits/dev-to/tools/community.d.ts +61 -0
- package/dist/toolkits/dev-to/tools/community.js +244 -0
- package/dist/toolkits/dev-to/tools/index.d.ts +202 -0
- package/dist/toolkits/dev-to/tools/index.js +37 -0
- package/dist/toolkits/dev-to/tools/listings.d.ts +26 -0
- package/dist/toolkits/dev-to/tools/listings.js +92 -0
- package/dist/toolkits/discord/tools/applications.d.ts +5 -5
- package/dist/toolkits/discord/tools/index.d.ts +5 -5
- package/dist/toolkits/figma/tools/create-modify-delete-variables.d.ts +1 -1
- package/dist/toolkits/figma/tools/get-file-nodes.d.ts +1 -1
- package/dist/toolkits/figma/tools/index.d.ts +3 -3
- package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
- package/dist/toolkits/google-analytics/tools/reports.d.ts +9 -9
- package/dist/toolkits/google-classroom/tools/index.d.ts +7 -7
- package/dist/toolkits/google-classroom/tools/invitations.d.ts +2 -2
- package/dist/toolkits/google-classroom/tools/misc.d.ts +1 -1
- package/dist/toolkits/google-classroom/tools/roster.d.ts +5 -5
- package/dist/toolkits/google-search-console/tools/index.d.ts +2 -2
- package/dist/toolkits/google-search-console/tools/search-analytics-query.d.ts +2 -2
- package/dist/toolkits/hacker-news/icon.d.ts +5 -0
- package/dist/toolkits/hacker-news/icon.js +9 -0
- package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
- package/dist/toolkits/hacker-news/manifest.js +25 -0
- package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
- package/dist/toolkits/hacker-news/tools/client.js +51 -0
- package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
- package/dist/toolkits/hacker-news/tools/index.js +22 -0
- package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
- package/dist/toolkits/hacker-news/tools/items.js +126 -0
- package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
- package/dist/toolkits/hacker-news/tools/search.js +40 -0
- package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
- package/dist/toolkits/hacker-news/tools/stories.js +98 -0
- package/dist/toolkits/hostinger/icon.d.ts +5 -0
- package/dist/toolkits/hostinger/icon.js +6 -0
- package/dist/toolkits/hostinger/manifest.d.ts +3 -0
- package/dist/toolkits/hostinger/manifest.js +36 -0
- package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
- package/dist/toolkits/hostinger/tools/billing.js +35 -0
- package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
- package/dist/toolkits/hostinger/tools/client.js +57 -0
- package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
- package/dist/toolkits/hostinger/tools/dns.js +47 -0
- package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
- package/dist/toolkits/hostinger/tools/domains.js +62 -0
- package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
- package/dist/toolkits/hostinger/tools/hosting.js +38 -0
- package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
- package/dist/toolkits/hostinger/tools/index.js +35 -0
- package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
- package/dist/toolkits/hostinger/tools/vps.js +77 -0
- package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
- package/dist/toolkits/hostinger/tools/whois.js +85 -0
- package/dist/toolkits/hugging-face/icon.d.ts +5 -0
- package/dist/toolkits/hugging-face/icon.js +6 -0
- package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
- package/dist/toolkits/hugging-face/manifest.js +42 -0
- package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
- package/dist/toolkits/hugging-face/tools/client.js +192 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
- package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
- package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
- package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
- package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
- package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
- package/dist/toolkits/hugging-face/tools/index.js +163 -0
- package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
- package/dist/toolkits/hugging-face/tools/inference.js +86 -0
- package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
- package/dist/toolkits/hugging-face/tools/models.js +273 -0
- package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
- package/dist/toolkits/hugging-face/tools/papers.js +91 -0
- package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
- package/dist/toolkits/hugging-face/tools/repos.js +201 -0
- package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
- package/dist/toolkits/hugging-face/tools/settings.js +88 -0
- package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
- package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
- package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
- package/dist/toolkits/hugging-face/tools/sql.js +47 -0
- package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
- package/dist/toolkits/hugging-face/tools/users.js +132 -0
- package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
- package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
- package/dist/toolkits/jira/icon.d.ts +5 -0
- package/dist/toolkits/jira/icon.js +6 -0
- package/dist/toolkits/jira/manifest.d.ts +3 -0
- package/dist/toolkits/jira/manifest.js +53 -0
- package/dist/toolkits/jira/tools/boards.d.ts +52 -0
- package/dist/toolkits/jira/tools/boards.js +104 -0
- package/dist/toolkits/jira/tools/client.d.ts +23 -0
- package/dist/toolkits/jira/tools/client.js +270 -0
- package/dist/toolkits/jira/tools/index.d.ts +1280 -0
- package/dist/toolkits/jira/tools/index.js +119 -0
- package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
- package/dist/toolkits/jira/tools/issue-fields.js +111 -0
- package/dist/toolkits/jira/tools/issues.d.ts +304 -0
- package/dist/toolkits/jira/tools/issues.js +593 -0
- package/dist/toolkits/jira/tools/meta.d.ts +212 -0
- package/dist/toolkits/jira/tools/meta.js +369 -0
- package/dist/toolkits/jira/tools/projects.d.ts +130 -0
- package/dist/toolkits/jira/tools/projects.js +263 -0
- package/dist/toolkits/jira/tools/search.d.ts +90 -0
- package/dist/toolkits/jira/tools/search.js +181 -0
- package/dist/toolkits/jira/tools/users.d.ts +114 -0
- package/dist/toolkits/jira/tools/users.js +221 -0
- package/dist/toolkits/kaggle/icon.d.ts +5 -0
- package/dist/toolkits/kaggle/icon.js +6 -0
- package/dist/toolkits/kaggle/manifest.d.ts +3 -0
- package/dist/toolkits/kaggle/manifest.js +32 -0
- package/dist/toolkits/kaggle/tools/client.d.ts +10 -0
- package/dist/toolkits/kaggle/tools/client.js +94 -0
- package/dist/toolkits/kaggle/tools/competitions.d.ts +48 -0
- package/dist/toolkits/kaggle/tools/competitions.js +109 -0
- package/dist/toolkits/kaggle/tools/config.d.ts +110 -0
- package/dist/toolkits/kaggle/tools/config.js +256 -0
- package/dist/toolkits/kaggle/tools/datasets.d.ts +88 -0
- package/dist/toolkits/kaggle/tools/datasets.js +161 -0
- package/dist/toolkits/kaggle/tools/index.d.ts +482 -0
- package/dist/toolkits/kaggle/tools/index.js +53 -0
- package/dist/toolkits/kaggle/tools/kernels.d.ts +62 -0
- package/dist/toolkits/kaggle/tools/kernels.js +121 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.d.ts +11 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.js +23 -0
- package/dist/toolkits/kaggle/tools/model_instances.d.ts +8 -0
- package/dist/toolkits/kaggle/tools/model_instances.js +20 -0
- package/dist/toolkits/kaggle/tools/models.d.ts +14 -0
- package/dist/toolkits/kaggle/tools/models.js +33 -0
- package/dist/toolkits/nasa/icon.d.ts +5 -0
- package/dist/toolkits/nasa/icon.js +56 -0
- package/dist/toolkits/nasa/manifest.d.ts +3 -0
- package/dist/toolkits/nasa/manifest.js +49 -0
- package/dist/toolkits/nasa/tools/agage.d.ts +60 -0
- package/dist/toolkits/nasa/tools/agage.js +176 -0
- package/dist/toolkits/nasa/tools/client.d.ts +95 -0
- package/dist/toolkits/nasa/tools/client.js +337 -0
- package/dist/toolkits/nasa/tools/cmr.d.ts +268 -0
- package/dist/toolkits/nasa/tools/cmr.js +984 -0
- package/dist/toolkits/nasa/tools/donki.d.ts +63 -0
- package/dist/toolkits/nasa/tools/donki.js +301 -0
- package/dist/toolkits/nasa/tools/eonet.d.ts +74 -0
- package/dist/toolkits/nasa/tools/eonet.js +279 -0
- package/dist/toolkits/nasa/tools/icesat2.d.ts +25 -0
- package/dist/toolkits/nasa/tools/icesat2.js +97 -0
- package/dist/toolkits/nasa/tools/imagery.d.ts +36 -0
- package/dist/toolkits/nasa/tools/imagery.js +138 -0
- package/dist/toolkits/nasa/tools/index.d.ts +1063 -0
- package/dist/toolkits/nasa/tools/index.js +865 -0
- package/dist/toolkits/nasa/tools/neo.d.ts +15 -0
- package/dist/toolkits/nasa/tools/neo.js +75 -0
- package/dist/toolkits/nasa/tools/ntrs.d.ts +152 -0
- package/dist/toolkits/nasa/tools/ntrs.js +292 -0
- package/dist/toolkits/nasa/tools/osdr.d.ts +72 -0
- package/dist/toolkits/nasa/tools/osdr.js +290 -0
- package/dist/toolkits/nasa/tools/planetary.d.ts +58 -0
- package/dist/toolkits/nasa/tools/planetary.js +312 -0
- package/dist/toolkits/nasa/tools/power.d.ts +52 -0
- package/dist/toolkits/nasa/tools/power.js +213 -0
- package/dist/toolkits/nasa/tools/ssc.d.ts +44 -0
- package/dist/toolkits/nasa/tools/ssc.js +92 -0
- package/dist/toolkits/nasa/tools/tolnet.d.ts +84 -0
- package/dist/toolkits/nasa/tools/tolnet.js +254 -0
- package/dist/toolkits/neo4j/icon.d.ts +5 -0
- package/dist/toolkits/neo4j/icon.js +6 -0
- package/dist/toolkits/neo4j/manifest.d.ts +3 -0
- package/dist/toolkits/neo4j/manifest.js +33 -0
- package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
- package/dist/toolkits/neo4j/tools/analytics.js +91 -0
- package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
- package/dist/toolkits/neo4j/tools/client.js +105 -0
- package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
- package/dist/toolkits/neo4j/tools/index.js +30 -0
- package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
- package/dist/toolkits/neo4j/tools/instances.js +127 -0
- package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
- package/dist/toolkits/neo4j/tools/projects.js +110 -0
- package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
- package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
- package/dist/toolkits/neon/icon.d.ts +5 -0
- package/dist/toolkits/neon/icon.js +8 -0
- package/dist/toolkits/neon/manifest.d.ts +3 -0
- package/dist/toolkits/neon/manifest.js +36 -0
- package/dist/toolkits/neon/tools/auth.d.ts +115 -0
- package/dist/toolkits/neon/tools/auth.js +286 -0
- package/dist/toolkits/neon/tools/branches.d.ts +189 -0
- package/dist/toolkits/neon/tools/branches.js +465 -0
- package/dist/toolkits/neon/tools/client.d.ts +10 -0
- package/dist/toolkits/neon/tools/client.js +69 -0
- package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
- package/dist/toolkits/neon/tools/dataapi.js +111 -0
- package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
- package/dist/toolkits/neon/tools/endpoints.js +163 -0
- package/dist/toolkits/neon/tools/index.d.ts +976 -0
- package/dist/toolkits/neon/tools/index.js +130 -0
- package/dist/toolkits/neon/tools/meta.d.ts +4 -0
- package/dist/toolkits/neon/tools/meta.js +16 -0
- package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
- package/dist/toolkits/neon/tools/orgs.js +303 -0
- package/dist/toolkits/neon/tools/projects.d.ts +177 -0
- package/dist/toolkits/neon/tools/projects.js +468 -0
- package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
- package/dist/toolkits/neon/tools/snapshots.js +67 -0
- package/dist/toolkits/new-relic/icon.d.ts +5 -0
- package/dist/toolkits/new-relic/icon.js +6 -0
- package/dist/toolkits/new-relic/manifest.d.ts +3 -0
- package/dist/toolkits/new-relic/manifest.js +41 -0
- package/dist/toolkits/new-relic/tools/admin.d.ts +310 -0
- package/dist/toolkits/new-relic/tools/admin.js +282 -0
- package/dist/toolkits/new-relic/tools/alert-policies.d.ts +74 -0
- package/dist/toolkits/new-relic/tools/alert-policies.js +136 -0
- package/dist/toolkits/new-relic/tools/apm.d.ts +129 -0
- package/dist/toolkits/new-relic/tools/apm.js +228 -0
- package/dist/toolkits/new-relic/tools/client.d.ts +62 -0
- package/dist/toolkits/new-relic/tools/client.js +167 -0
- package/dist/toolkits/new-relic/tools/conditions.d.ts +190 -0
- package/dist/toolkits/new-relic/tools/conditions.js +265 -0
- package/dist/toolkits/new-relic/tools/config.d.ts +73 -0
- package/dist/toolkits/new-relic/tools/config.js +131 -0
- package/dist/toolkits/new-relic/tools/dashboards.d.ts +204 -0
- package/dist/toolkits/new-relic/tools/dashboards.js +159 -0
- package/dist/toolkits/new-relic/tools/entities.d.ts +160 -0
- package/dist/toolkits/new-relic/tools/entities.js +218 -0
- package/dist/toolkits/new-relic/tools/index.d.ts +23 -0
- package/dist/toolkits/new-relic/tools/index.js +179 -0
- package/dist/toolkits/new-relic/tools/ingest.d.ts +31 -0
- package/dist/toolkits/new-relic/tools/ingest.js +80 -0
- package/dist/toolkits/new-relic/tools/notifications.d.ts +186 -0
- package/dist/toolkits/new-relic/tools/notifications.js +232 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.d.ts +105 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.js +136 -0
- package/dist/toolkits/new-relic/tools/nrql.d.ts +38 -0
- package/dist/toolkits/new-relic/tools/nrql.js +99 -0
- package/dist/toolkits/new-relic/tools/synthetics.d.ts +176 -0
- package/dist/toolkits/new-relic/tools/synthetics.js +246 -0
- package/dist/toolkits/notebook-lm/icon.d.ts +5 -0
- package/dist/toolkits/notebook-lm/icon.js +6 -0
- package/dist/toolkits/notebook-lm/manifest.d.ts +3 -0
- package/dist/toolkits/notebook-lm/manifest.js +44 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.d.ts +36 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.js +51 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.d.ts +47 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.js +55 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.js +49 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.js +47 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.js +45 -0
- package/dist/toolkits/notebook-lm/tools/get-source.d.ts +53 -0
- package/dist/toolkits/notebook-lm/tools/get-source.js +47 -0
- package/dist/toolkits/notebook-lm/tools/index.d.ts +516 -0
- package/dist/toolkits/notebook-lm/tools/index.js +93 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.js +41 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.d.ts +48 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.js +57 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.d.ts +40 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.js +62 -0
- package/dist/toolkits/notebook-lm/tools/utils.d.ts +15 -0
- package/dist/toolkits/notebook-lm/tools/utils.js +46 -0
- package/dist/toolkits/npm/icon.d.ts +5 -0
- package/dist/toolkits/npm/icon.js +11 -0
- package/dist/toolkits/npm/manifest.d.ts +3 -0
- package/dist/toolkits/npm/manifest.js +35 -0
- package/dist/toolkits/npm/tools/client.d.ts +19 -0
- package/dist/toolkits/npm/tools/client.js +64 -0
- package/dist/toolkits/npm/tools/downloads.d.ts +19 -0
- package/dist/toolkits/npm/tools/downloads.js +39 -0
- package/dist/toolkits/npm/tools/index.d.ts +14 -0
- package/dist/toolkits/npm/tools/index.js +24 -0
- package/dist/toolkits/npm/tools/registry.d.ts +24 -0
- package/dist/toolkits/npm/tools/registry.js +58 -0
- package/dist/toolkits/npm/tools/security.d.ts +9 -0
- package/dist/toolkits/npm/tools/security.js +29 -0
- package/dist/toolkits/slack/tools/admin-users.d.ts +1 -1
- package/dist/toolkits/slack/tools/slack-lists.d.ts +3 -3
- package/dist/toolkits/snowflake/icon.d.ts +5 -0
- package/dist/toolkits/snowflake/icon.js +6 -0
- package/dist/toolkits/snowflake/manifest.d.ts +3 -0
- package/dist/toolkits/snowflake/manifest.js +32 -0
- package/dist/toolkits/snowflake/tools/catalog.d.ts +56 -0
- package/dist/toolkits/snowflake/tools/catalog.js +123 -0
- package/dist/toolkits/snowflake/tools/client.d.ts +53 -0
- package/dist/toolkits/snowflake/tools/client.js +145 -0
- package/dist/toolkits/snowflake/tools/index.d.ts +14 -0
- package/dist/toolkits/snowflake/tools/index.js +28 -0
- package/dist/toolkits/snowflake/tools/statements.d.ts +27 -0
- package/dist/toolkits/snowflake/tools/statements.js +84 -0
- package/dist/toolkits/snowflake/tools/status.d.ts +22 -0
- package/dist/toolkits/snowflake/tools/status.js +54 -0
- package/dist/toolkits/telegram/icon.d.ts +5 -0
- package/dist/toolkits/telegram/icon.js +6 -0
- package/dist/toolkits/telegram/manifest.d.ts +3 -0
- package/dist/toolkits/telegram/manifest.js +34 -0
- package/dist/toolkits/telegram/tools/bot.d.ts +13 -0
- package/dist/toolkits/telegram/tools/bot.js +23 -0
- package/dist/toolkits/telegram/tools/chats.d.ts +22 -0
- package/dist/toolkits/telegram/tools/chats.js +46 -0
- package/dist/toolkits/telegram/tools/client.d.ts +12 -0
- package/dist/toolkits/telegram/tools/client.js +46 -0
- package/dist/toolkits/telegram/tools/index.d.ts +15 -0
- package/dist/toolkits/telegram/tools/index.js +31 -0
- package/dist/toolkits/telegram/tools/messages.d.ts +86 -0
- package/dist/toolkits/telegram/tools/messages.js +134 -0
- package/dist/toolkits/telegram/tools/updates.d.ts +23 -0
- package/dist/toolkits/telegram/tools/updates.js +54 -0
- package/dist/toolkits/youtube/tools/get-channel-activities.d.ts +1 -1
- package/dist/toolkits/youtube/tools/index.d.ts +5 -5
- package/dist/toolkits/youtube/tools/list-channel-sections.d.ts +1 -1
- package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
- package/dist/toolkits/youtube/tools/subscribe-channel.d.ts +1 -1
- package/dist/toolkits/youtube/tools/unsubscribe-channel.d.ts +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { hfApi, hfCommit, HOSTS } from './client.js';
|
|
5
|
+
import { repoIdOf as _r, uiPrefix as _u } from './client.js';
|
|
6
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
7
|
+
function repoIdOf(namespace, repo, repoId) { return _r(namespace, repo, repoId); }
|
|
8
|
+
function uiPrefix(repoType) { return _u(repoType); }
|
|
9
|
+
export const huggingFaceCreateDatasetsBranch = tool({
|
|
10
|
+
description: "Tool to create a new branch in a Hugging Face dataset repository. Use when you need to create a branch for versioning or experimentation with dataset changes.",
|
|
11
|
+
inputSchema: z.object({
|
|
12
|
+
huggingFaceToken: tokenField,
|
|
13
|
+
rev: z.string().describe("The name of the new branch to create."),
|
|
14
|
+
repo: z.string().describe("The name of the dataset repository without the namespace prefix."),
|
|
15
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the dataset repository."),
|
|
16
|
+
overwrite: z.boolean().optional().describe("Overwrite the branch if it already exists. Defaults to false."),
|
|
17
|
+
emptyBranch: z.boolean().optional().describe("Create an empty branch without any files. Defaults to false."),
|
|
18
|
+
startingPoint: z.string().optional().describe("The commit hash, tag, or branch name to start the new branch from. Defaults to 'main' if not specified."),
|
|
19
|
+
}),
|
|
20
|
+
execute: async ({ huggingFaceToken, rev, repo, namespace, overwrite, emptyBranch, startingPoint }) => {
|
|
21
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
22
|
+
const queryParams = undefined;
|
|
23
|
+
const body = { starting_point: startingPoint, empty_branch: emptyBranch, overwrite: overwrite };
|
|
24
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/branch/${encodeURIComponent(rev)}`, queryParams, body });
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const huggingFaceCreateDatasetsCommit = tool({
|
|
28
|
+
description: "Tool to create a commit in a Hugging Face dataset repository. Use when you need to add, update, or delete files in a dataset. Supports both regular files and Large File Storage (LFS) for large binary files. Can optionally create a pull request instead of directly committing.",
|
|
29
|
+
inputSchema: z.object({
|
|
30
|
+
huggingFaceToken: tokenField,
|
|
31
|
+
rev: z.string().describe("Revision (branch name, tag, or commit SHA) to commit to"),
|
|
32
|
+
repo: z.string().describe("Name of the dataset repository"),
|
|
33
|
+
files: z.array(z.record(z.any())).optional().describe("List of files to add or update in the commit. Each file requires a path and either content or oldPath."),
|
|
34
|
+
summary: z.string().describe("Summary of the commit (required). This is the commit message title."),
|
|
35
|
+
createPr: z.string().optional().describe("Whether to create a pull request from the commit. Set to '1' or 'true' to create a PR."),
|
|
36
|
+
lfsFiles: z.array(z.record(z.any())).optional().describe("List of Large File Storage (LFS) files to include in the commit"),
|
|
37
|
+
namespace: z.string().describe("Namespace (username or organization) that owns the dataset repository"),
|
|
38
|
+
hotReload: z.string().optional().describe("For Spaces, whether to try to hot reload the commit (only for single Python file updates). Set to '1' or 'true' to enable."),
|
|
39
|
+
description: z.string().optional().describe("Detailed description of the commit (optional). Defaults to empty string."),
|
|
40
|
+
parentCommit: z.string().optional().describe("Parent commit SHA (40-character hexadecimal string). Optional, defaults to HEAD of the revision."),
|
|
41
|
+
deletedEntries: z.array(z.record(z.any())).optional().describe("List of files to delete from the repository"),
|
|
42
|
+
}),
|
|
43
|
+
execute: async ({ huggingFaceToken, rev, repo, files, summary, createPr, lfsFiles, namespace, hotReload, description, parentCommit, deletedEntries }) => {
|
|
44
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
45
|
+
const queryParams = undefined;
|
|
46
|
+
const typeSeg = { model: 'models', dataset: 'datasets', space: 'spaces' }['datasets'];
|
|
47
|
+
return hfCommit(huggingFaceToken, { repoType: typeSeg, repoId: repoIdOf(namespace, repo, undefined), rev, summary, description, parentCommit, files, lfsFiles, deletedEntries, createPr });
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
export const huggingFaceCreateDatasetsPreupload = tool({
|
|
51
|
+
description: "Tool to check if files should be uploaded via Large File Storage (LFS) or directly to a Hugging Face dataset repository. Use before uploading files to determine the correct upload method for each file based on size and repository settings.",
|
|
52
|
+
inputSchema: z.object({
|
|
53
|
+
huggingFaceToken: tokenField,
|
|
54
|
+
rev: z.string().describe("Revision (branch or commit) to check preupload for. Typically 'main' for the default branch"),
|
|
55
|
+
repo: z.string().describe("Name of the dataset repository"),
|
|
56
|
+
files: z.array(z.record(z.any())).min(1).max(1000).describe("List of files to check for upload method. Maximum 1000 files per request"),
|
|
57
|
+
gitIgnore: z.string().optional().describe("Content of .gitignore file for the revision. Optional; uses existing .gitignore if not provided"),
|
|
58
|
+
namespace: z.string().describe("Namespace (username or organization) that owns the dataset repository"),
|
|
59
|
+
gitAttributes: z.string().optional().describe("Content of .gitattributes file if you plan to modify it yourself. Only needed if managing LFS tracking manually; otherwise HF automatically updates .gitattributes"),
|
|
60
|
+
}),
|
|
61
|
+
execute: async ({ huggingFaceToken, rev, repo, files, gitIgnore, namespace, gitAttributes }) => {
|
|
62
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
63
|
+
const queryParams = undefined;
|
|
64
|
+
const body = { files: files, git_attributes: gitAttributes, git_ignore: gitIgnore };
|
|
65
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/preupload/${encodeURIComponent(rev)}`, queryParams, body });
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const huggingFaceCreateDatasetsTag = tool({
|
|
69
|
+
description: "Tool to create a tag on a Hugging Face dataset repository. Use when you need to mark a specific revision with a named tag.",
|
|
70
|
+
inputSchema: z.object({
|
|
71
|
+
huggingFaceToken: tokenField,
|
|
72
|
+
rev: z.string().describe("The revision (branch or commit SHA) to create the tag from, typically 'main'."),
|
|
73
|
+
tag: z.string().describe("The name of the tag to create (e.g., 'v1.0', 'release-2024')."),
|
|
74
|
+
repo: z.string().describe("The name of the dataset repository to create a tag for."),
|
|
75
|
+
message: z.string().optional().describe("Optional message describing the purpose of this tag."),
|
|
76
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the dataset."),
|
|
77
|
+
}),
|
|
78
|
+
execute: async ({ huggingFaceToken, rev, tag, repo, message, namespace }) => {
|
|
79
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
80
|
+
const queryParams = undefined;
|
|
81
|
+
const body = { revision: rev, message: message };
|
|
82
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/tag/${encodeURIComponent(tag)}`, queryParams, body });
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
export const huggingFaceDeleteDatasetsBranch = tool({
|
|
86
|
+
description: "Tool to delete a branch from a Hugging Face dataset repository. Use when you need to remove a branch that is no longer needed. This action permanently removes the specified branch from the dataset.",
|
|
87
|
+
inputSchema: z.object({
|
|
88
|
+
huggingFaceToken: tokenField,
|
|
89
|
+
rev: z.string().describe("The name of the branch to delete from the dataset repository. This should be a valid branch name (not the main/master branch in most cases)."),
|
|
90
|
+
repo: z.string().describe("The name of the dataset repository from which to delete the branch. This is the repository identifier without the namespace."),
|
|
91
|
+
namespace: z.string().describe("The namespace (user or organization) that owns the dataset. For example, '121tester' for a user or 'huggingface' for an organization."),
|
|
92
|
+
}),
|
|
93
|
+
execute: async ({ huggingFaceToken, rev, repo, namespace }) => {
|
|
94
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
95
|
+
const queryParams = undefined;
|
|
96
|
+
return hfApi(huggingFaceToken, { method: 'DELETE', url: `${HOSTS.HUB}/api/datasets/${repoId}/branch/${encodeURIComponent(rev)}`, queryParams });
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
export const huggingFaceDeleteDatasetsTag = tool({
|
|
100
|
+
description: "Tool to delete a tag from a Hugging Face dataset. Use when you need to remove a specific tag revision from a dataset repository.",
|
|
101
|
+
inputSchema: z.object({
|
|
102
|
+
huggingFaceToken: tokenField,
|
|
103
|
+
rev: z.string().describe("The tag revision to delete from the dataset."),
|
|
104
|
+
repo: z.string().describe("The repository name of the dataset."),
|
|
105
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset."),
|
|
106
|
+
}),
|
|
107
|
+
execute: async ({ huggingFaceToken, rev, repo, namespace }) => {
|
|
108
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
109
|
+
const queryParams = undefined;
|
|
110
|
+
return hfApi(huggingFaceToken, { method: 'DELETE', url: `${HOSTS.HUB}/api/datasets/${repoId}/tag/${encodeURIComponent(rev)}`, queryParams });
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
export const huggingFaceGetDatasetRepoInfo = tool({
|
|
114
|
+
description: "Tool to retrieve detailed information about a Hugging Face dataset repository. Use when you need metadata, card data, tags, downloads, likes, configurations, or other information about a specific dataset.",
|
|
115
|
+
inputSchema: z.object({
|
|
116
|
+
huggingFaceToken: tokenField,
|
|
117
|
+
repoId: z.string().describe("Dataset repository ID in the format author/dataset-name (e.g., 'rajpurkar/squad', 'stanfordnlp/imdb')"),
|
|
118
|
+
revision: z.string().optional().describe("Git revision (branch, tag, or commit SHA) to retrieve information for. If not specified, defaults to the main branch"),
|
|
119
|
+
}),
|
|
120
|
+
execute: async ({ huggingFaceToken, repoId, revision }) => {
|
|
121
|
+
const queryParams = { revision: revision };
|
|
122
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}`, queryParams });
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
export const huggingFaceGetDatasetsCompare = tool({
|
|
126
|
+
description: "Tool to get a comparison (diff) between two revisions of a Hugging Face dataset. Use when you need to see what changed between dataset versions or commits.",
|
|
127
|
+
inputSchema: z.object({
|
|
128
|
+
huggingFaceToken: tokenField,
|
|
129
|
+
raw: z.boolean().optional().describe("Whether to return the raw diff output. If false or not provided, returns formatted diff."),
|
|
130
|
+
repo: z.string().describe("The name of the dataset repository to compare."),
|
|
131
|
+
compare: z.string().describe("The comparison specification in the format 'base..head' (e.g., 'main~1..main' for comparing the previous commit to main, or 'abc123..def456' for comparing specific commits)."),
|
|
132
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the dataset."),
|
|
133
|
+
}),
|
|
134
|
+
execute: async ({ huggingFaceToken, raw, repo, compare, namespace }) => {
|
|
135
|
+
const prefix = { models: '', datasets: 'datasets', spaces: 'spaces' }['datasets'];
|
|
136
|
+
const basePath = prefix ? `/${prefix}/${repoIdOf(namespace, repo, undefined)}` : `/${repoIdOf(namespace, repo, undefined)}`;
|
|
137
|
+
const queryParams = { raw: raw };
|
|
138
|
+
return hfText(huggingFaceToken, { url: `${HOSTS.HUB}${basePath}/compare/${compare}`, queryParams });
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
export const huggingFaceGetDatasetsJwt = tool({
|
|
142
|
+
description: "Tool to generate a JWT token for accessing a Hugging Face dataset repository. Use when you need authenticated access to datasets, optionally with write access for spaces in dev mode, custom expiration, or encryption.",
|
|
143
|
+
inputSchema: z.object({
|
|
144
|
+
huggingFaceToken: tokenField,
|
|
145
|
+
repo: z.string().describe("The name of the dataset repository."),
|
|
146
|
+
write: z.string().optional().describe("Enable write access for spaces in dev mode. Set to 'true' to enable write access."),
|
|
147
|
+
encrypted: z.string().optional().describe("Request an encrypted JWT token. Set to 'true' to receive encrypted token with key ID."),
|
|
148
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset repository."),
|
|
149
|
+
expiration: z.string().optional().describe("Custom expiration time for the JWT token. Format depends on Hugging Face API specifications."),
|
|
150
|
+
inferenceApi: z.string().optional().describe("Enable inference API access. Set to 'true' to enable."),
|
|
151
|
+
includeProStatus: z.string().optional().describe("Include Pro status information in the token. Set to 'true' to include."),
|
|
152
|
+
}),
|
|
153
|
+
execute: async ({ huggingFaceToken, repo, write, encrypted, namespace, expiration, inferenceApi, includeProStatus }) => {
|
|
154
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
155
|
+
const queryParams = { write: write, encrypted: encrypted, expiration: expiration, inference_api: inferenceApi, include_pro_status: includeProStatus };
|
|
156
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/jwt`, queryParams });
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
export const huggingFaceGetDatasetsLeaderboard = tool({
|
|
160
|
+
description: "Tool to retrieve evaluation results ranked by score for a dataset's leaderboard. Use when you need to compare model performance on a specific dataset or task. Returns an array of leaderboard entries with model information, scores, and rankings.",
|
|
161
|
+
inputSchema: z.object({
|
|
162
|
+
huggingFaceToken: tokenField,
|
|
163
|
+
repo: z.string().describe("The repository name of the dataset. For example, 'results' for the dataset 'open-llm-leaderboard/results'."),
|
|
164
|
+
taskId: z.string().optional().describe("Optional task identifier to filter leaderboard results by a specific task. If not provided, returns results for all tasks."),
|
|
165
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset. For example, 'open-llm-leaderboard' for the dataset 'open-llm-leaderboard/results'."),
|
|
166
|
+
}),
|
|
167
|
+
execute: async ({ huggingFaceToken, repo, taskId, namespace }) => {
|
|
168
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
169
|
+
const queryParams = { task_id: taskId };
|
|
170
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/leaderboard`, queryParams });
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
export const huggingFaceGetDatasetsNotebook = tool({
|
|
174
|
+
description: "Tool to get a Jupyter notebook URL from a Hugging Face dataset repository. Use when you need to retrieve the URL for a specific .ipynb file from a dataset at a particular revision.",
|
|
175
|
+
inputSchema: z.object({
|
|
176
|
+
huggingFaceToken: tokenField,
|
|
177
|
+
rev: z.string().describe("The git revision (branch, tag, or commit hash) to retrieve the notebook from."),
|
|
178
|
+
path: z.string().describe("The path to the notebook file within the repository, including the .ipynb extension."),
|
|
179
|
+
repo: z.string().describe("The repository name of the dataset."),
|
|
180
|
+
namespace: z.string().describe("The namespace (user or organization) that owns the dataset."),
|
|
181
|
+
}),
|
|
182
|
+
execute: async ({ huggingFaceToken, rev, path, repo, namespace }) => {
|
|
183
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
184
|
+
const queryParams = undefined;
|
|
185
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/notebook/${encodeURIComponent(rev)}/${encodeURIComponent(path)}`, queryParams });
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
export const huggingFaceGetDatasetsResolve = tool({
|
|
189
|
+
description: "Tool to resolve and download a file from a Hugging Face dataset repository. This endpoint requires following redirections to retrieve file content or returns XET file info when Accept header is set appropriately. Use when you need to access files from datasets with proper redirection handling.",
|
|
190
|
+
inputSchema: z.object({
|
|
191
|
+
huggingFaceToken: tokenField,
|
|
192
|
+
rev: z.string().describe("The git revision (commit SHA, branch name, or tag) to resolve the file from."),
|
|
193
|
+
path: z.string().describe("The path to the file within the repository (wildcard path parameter)."),
|
|
194
|
+
repo: z.string().describe("The name of the dataset repository."),
|
|
195
|
+
range: z.string().optional().describe("The range in bytes of the file to download (e.g., 'bytes=0-1023' for first 1KB)."),
|
|
196
|
+
accept: z.string().optional().describe("Returns json information about the XET file info if the file is a XET file. Use 'application/vnd.xet-fileinfo+json' to get XET metadata, otherwise leave empty to download file content."),
|
|
197
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset repository."),
|
|
198
|
+
}),
|
|
199
|
+
execute: async ({ huggingFaceToken, rev, path, repo, range, accept, namespace }) => {
|
|
200
|
+
const prefix = uiPrefix(repoType);
|
|
201
|
+
const basePath = prefix ? `/${prefix}/${repoIdOf(namespace, repo, undefined)}` : `/${repoIdOf(namespace, repo, undefined)}`;
|
|
202
|
+
const queryParams = undefined;
|
|
203
|
+
return hfRedirect(huggingFaceToken, { url: `${HOSTS.HUB}${basePath}/resolve/${encodeURIComponent(rev)}/${path}`, queryParams, headers: { ...(accept ? { Accept: accept } : {}), ...(range ? { Range: range } : {}) } });
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
export const huggingFaceGetDatasetsScan = tool({
|
|
207
|
+
description: "Tool to retrieve the security scan status of a Hugging Face dataset repository. Use when you need to check for malware, pickle vulnerabilities, or other security issues in a dataset.",
|
|
208
|
+
inputSchema: z.object({
|
|
209
|
+
huggingFaceToken: tokenField,
|
|
210
|
+
repo: z.string().describe("The name of the dataset repository to scan"),
|
|
211
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset repository"),
|
|
212
|
+
}),
|
|
213
|
+
execute: async ({ huggingFaceToken, repo, namespace }) => {
|
|
214
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
215
|
+
const queryParams = undefined;
|
|
216
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/scan`, queryParams });
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
export const huggingFaceGetDatasetsTreesize = tool({
|
|
220
|
+
description: "Tool to get the total size of a Hugging Face dataset repository at a specific revision and path. Use when you need to determine storage requirements or track repository size changes.",
|
|
221
|
+
inputSchema: z.object({
|
|
222
|
+
huggingFaceToken: tokenField,
|
|
223
|
+
rev: z.string().describe("The Git revision or branch name to query (e.g., 'main', 'dev', or a commit SHA)."),
|
|
224
|
+
path: z.string().optional().describe("The path within the repository to calculate size for. Use '.' for root directory or specify a subdirectory path (e.g., 'data/train'). The size is calculated recursively for all files under this path."),
|
|
225
|
+
repo: z.string().describe("The repository name of the dataset (e.g., 'gsm8k', 'wikitext')."),
|
|
226
|
+
namespace: z.string().describe("The namespace or organization name that owns the dataset (e.g., 'squad', 'openai')."),
|
|
227
|
+
}),
|
|
228
|
+
execute: async ({ huggingFaceToken, rev, path, repo, namespace }) => {
|
|
229
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
230
|
+
const queryParams = { path: path };
|
|
231
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/treesize/${encodeURIComponent(rev)}`, queryParams });
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
export const huggingFaceGetDatasetsXetReadToken = tool({
|
|
235
|
+
description: "Tool to get a read short-lived access token for XET from Hugging Face datasets. Use when you need temporary read access to dataset content through XET protocol.",
|
|
236
|
+
inputSchema: z.object({
|
|
237
|
+
huggingFaceToken: tokenField,
|
|
238
|
+
rev: z.string().describe("The revision (branch, tag, or commit) to get the token for. Use 'main' for the default branch."),
|
|
239
|
+
repo: z.string().describe("The repository name of the dataset. For example, 'squad' for the SQuAD dataset."),
|
|
240
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset. For example, 'rajpurkar' for the SQuAD dataset."),
|
|
241
|
+
}),
|
|
242
|
+
execute: async ({ huggingFaceToken, rev, repo, namespace }) => {
|
|
243
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
244
|
+
const queryParams = undefined;
|
|
245
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/xet-read-token/${encodeURIComponent(rev)}`, queryParams });
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
export const huggingFaceGetResolveCacheDatasets = tool({
|
|
249
|
+
description: "Tool to resolve a file from cache in a Hugging Face dataset repository. This endpoint follows redirections (302, 307) to retrieve file content or returns XET file info when Accept header is set appropriately. Use when you need to access cached files from datasets with proper redirection handling.",
|
|
250
|
+
inputSchema: z.object({
|
|
251
|
+
huggingFaceToken: tokenField,
|
|
252
|
+
rev: z.string().describe("The git revision (commit SHA, branch, or tag) to resolve the file from. Note: This endpoint typically requires an exact commit SHA rather than branch names."),
|
|
253
|
+
path: z.string().describe("The path to the file within the repository (wildcard path parameter)."),
|
|
254
|
+
repo: z.string().describe("The name of the dataset repository."),
|
|
255
|
+
range: z.string().optional().describe("The range in bytes of the file to download (e.g., 'bytes=0-1023' for first 1KB)."),
|
|
256
|
+
accept: z.string().optional().describe("Returns json information about the XET file info if the file is a XET file. Use 'application/vnd.xet-fileinfo+json' to get XET metadata, otherwise leave empty to download file content."),
|
|
257
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset repository."),
|
|
258
|
+
}),
|
|
259
|
+
execute: async ({ huggingFaceToken, rev, path, repo, range, accept, namespace }) => {
|
|
260
|
+
const typeSeg = { model: 'models', dataset: 'datasets', space: 'spaces' }['datasets'];
|
|
261
|
+
const queryParams = undefined;
|
|
262
|
+
return hfRedirect(huggingFaceToken, { url: `${HOSTS.HUB}/api/${typeSeg}/${repoIdOf(namespace, repo, undefined)}/${encodeURIComponent(rev)}/${path}`, queryParams });
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
export const huggingFaceHandleDatasetsUserAccessRequest = tool({
|
|
266
|
+
description: "Tool to handle a user's access request to a gated Hugging Face dataset. Use this to accept, reject, or update the status of access requests for repositories with gated access. Either 'user' or 'userId' must be provided to identify the user.",
|
|
267
|
+
inputSchema: z.object({
|
|
268
|
+
huggingFaceToken: tokenField,
|
|
269
|
+
repo: z.string().describe("The repository name of the gated dataset. For example, 'test-gated-dataset-cancel'."),
|
|
270
|
+
user: z.string().optional().describe("The username of the user whose access request is being handled. Either 'user' or 'userId' must be provided, but not both."),
|
|
271
|
+
status: z.enum(["accepted", "rejected", "pending"]).describe("The decision on the access request. Use 'accepted' to grant access, 'rejected' to deny access, or 'pending' to keep the request pending."),
|
|
272
|
+
userId: z.string().optional().describe("The user ID (24-character hexadecimal string) of the user whose access request is being handled. Either 'user' or 'userId' must be provided, but not both."),
|
|
273
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset. For example, '121tester' or 'huggingface'."),
|
|
274
|
+
rejectionReason: z.string().max(200).optional().describe("The reason for rejecting the access request. Maximum 200 characters. Only applicable when status is 'rejected'."),
|
|
275
|
+
}),
|
|
276
|
+
execute: async ({ huggingFaceToken, repo, user, status, userId, namespace, rejectionReason }) => {
|
|
277
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
278
|
+
const queryParams = undefined;
|
|
279
|
+
const body = { user: user, user_id: userId, rejection_reason: rejectionReason };
|
|
280
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/user-access-request/${encodeURIComponent(status)}`, queryParams, body });
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
export const huggingFaceListDatasetPathsInfo = tool({
|
|
284
|
+
description: "Tool to list detailed information about specific paths in a Hugging Face dataset repository. Use when you need to get metadata about files or directories in a dataset, including size, type, commit history, and security scan status.",
|
|
285
|
+
inputSchema: z.object({
|
|
286
|
+
huggingFaceToken: tokenField,
|
|
287
|
+
rev: z.string().describe("Git revision (branch, tag, or commit hash) to query"),
|
|
288
|
+
repo: z.string().describe("Dataset repository name"),
|
|
289
|
+
paths: z.record(z.any()).describe("List of paths to get information about, or a single path string. Paths are relative to the repository root."),
|
|
290
|
+
expand: z.record(z.any()).describe("Whether to expand the response with last commit and security file status information. Can be a boolean or an object with expansion options."),
|
|
291
|
+
namespace: z.string().describe("Namespace (user or organization) that owns the dataset"),
|
|
292
|
+
}),
|
|
293
|
+
execute: async ({ huggingFaceToken, rev, repo, paths, expand, namespace }) => {
|
|
294
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
295
|
+
const queryParams = undefined;
|
|
296
|
+
const body = { paths: paths, expand: expand };
|
|
297
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/paths-info/${encodeURIComponent(rev)}`, queryParams, body });
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
export const huggingFaceListDatasetsCommits = tool({
|
|
301
|
+
description: "Tool to list commits from a Hugging Face dataset repository. Use when you need to retrieve the commit history for a specific dataset branch or revision.",
|
|
302
|
+
inputSchema: z.object({
|
|
303
|
+
huggingFaceToken: tokenField,
|
|
304
|
+
p: z.number().int().min(0).optional().describe("Page number for pagination. Starts from 0 for the first page."),
|
|
305
|
+
rev: z.string().describe("The revision (branch, tag, or commit hash) to list commits from."),
|
|
306
|
+
repo: z.string().describe("The repository name of the dataset."),
|
|
307
|
+
limit: z.number().int().min(1).max(100).optional().describe("Maximum number of commits to return per page. Default is 50."),
|
|
308
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the dataset."),
|
|
309
|
+
}),
|
|
310
|
+
execute: async ({ huggingFaceToken, p, rev, repo, limit, namespace }) => {
|
|
311
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
312
|
+
const queryParams = { p: p, limit: limit };
|
|
313
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/commits/${encodeURIComponent(rev)}`, queryParams });
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
export const huggingFaceListDatasetsRefs = tool({
|
|
317
|
+
description: "Tool to list all references (branches, tags, converts, pull requests) in a Hugging Face dataset repository. Use when you need to retrieve available references for a specific dataset.",
|
|
318
|
+
inputSchema: z.object({
|
|
319
|
+
huggingFaceToken: tokenField,
|
|
320
|
+
repo: z.string().describe("The repository name of the dataset."),
|
|
321
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset."),
|
|
322
|
+
includePrs: z.boolean().optional().describe("Whether to include pull requests in the response. Set to true to include pull requests."),
|
|
323
|
+
}),
|
|
324
|
+
execute: async ({ huggingFaceToken, repo, namespace, includePrs }) => {
|
|
325
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
326
|
+
const queryParams = { include_prs: includePrs };
|
|
327
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/refs`, queryParams });
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
export const huggingFaceListDatasetsUserAccessRequest = tool({
|
|
331
|
+
description: "Tool to list access requests for a gated Hugging Face dataset repository. Use when you need to view pending, accepted, or rejected access requests for datasets with restricted access.",
|
|
332
|
+
inputSchema: z.object({
|
|
333
|
+
huggingFaceToken: tokenField,
|
|
334
|
+
repo: z.string().describe("The repository name of the gated dataset"),
|
|
335
|
+
after: z.string().optional().describe("Cursor for pagination - returns requests after this cursor"),
|
|
336
|
+
limit: z.number().int().min(1).optional().describe("Maximum number of access requests to return (default: 1000)"),
|
|
337
|
+
before: z.string().optional().describe("Cursor for pagination - returns requests before this cursor"),
|
|
338
|
+
status: z.enum(["pending", "accepted", "rejected"]).describe("Filter access requests by status: pending, accepted, or rejected"),
|
|
339
|
+
namespace: z.string().describe("The namespace or organization name that owns the dataset"),
|
|
340
|
+
}),
|
|
341
|
+
execute: async ({ huggingFaceToken, repo, after, limit, before, status, namespace }) => {
|
|
342
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
343
|
+
const queryParams = { limit: limit, after: after, before: before };
|
|
344
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/datasets/${repoId}/user-access-request/${encodeURIComponent(status)}`, queryParams });
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
export const huggingFaceSquashDatasetCommits = tool({
|
|
348
|
+
description: "Tool to squash all commits in a dataset ref into a single commit with the given message. Use when consolidating commit history into a single commit. WARNING: This operation is irreversible.",
|
|
349
|
+
inputSchema: z.object({
|
|
350
|
+
huggingFaceToken: tokenField,
|
|
351
|
+
rev: z.string().describe("The ref (branch or revision) to squash. This operation is irreversible and will squash all commits in this ref into a single commit."),
|
|
352
|
+
repo: z.string().describe("The name of the dataset repository to squash commits in."),
|
|
353
|
+
message: z.string().max(500).optional().describe("The commit message for the squashed commit. Maximum length is 500 characters."),
|
|
354
|
+
namespace: z.string().describe("The namespace (organization or user) that owns the dataset."),
|
|
355
|
+
}),
|
|
356
|
+
execute: async ({ huggingFaceToken, rev, repo, message, namespace }) => {
|
|
357
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
358
|
+
const queryParams = undefined;
|
|
359
|
+
const body = { message: message };
|
|
360
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/datasets/${repoId}/super-squash/${encodeURIComponent(rev)}`, queryParams, body });
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
export const huggingFaceUpdateDatasetsSettings = tool({
|
|
364
|
+
description: "Tool to update settings for a Hugging Face dataset repository. Use when you need to configure visibility, discussions, gating, or access control for a dataset.",
|
|
365
|
+
inputSchema: z.object({
|
|
366
|
+
huggingFaceToken: tokenField,
|
|
367
|
+
repo: z.string().describe("The name of the dataset repository"),
|
|
368
|
+
gated: z.record(z.any()).optional().describe("Gating configuration for the dataset. Controls access restrictions and gating behavior. Can be a boolean to enable/disable gating, or an object with gating configuration"),
|
|
369
|
+
isPrivate: z.boolean().optional().describe("Whether the dataset is private. Set to true to make private, false to make public"),
|
|
370
|
+
namespace: z.string().describe("The namespace (organization or username) that owns the dataset"),
|
|
371
|
+
discussionsSorting: z.enum(["recently-created", "trending", "reactions"]).optional().describe("Enum for discussion sorting options."),
|
|
372
|
+
discussionsDisabled: z.boolean().optional().describe("Whether discussions are disabled for this dataset. Set to true to disable discussions, false to enable them"),
|
|
373
|
+
gatedNotificationsMode: z.enum(["bulk", "real-time"]).optional().describe("Enum for gated notification modes."),
|
|
374
|
+
gatedNotificationsEmail: z.string().optional().describe("Email address to receive notifications about gated access requests. Must be a valid email format"),
|
|
375
|
+
}),
|
|
376
|
+
execute: async ({ huggingFaceToken, repo, gated, isPrivate, namespace, discussionsSorting, discussionsDisabled, gatedNotificationsMode, gatedNotificationsEmail }) => {
|
|
377
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
378
|
+
const queryParams = undefined;
|
|
379
|
+
const body = { gated: gated, private: isPrivate, discussions_sorting: discussionsSorting, discussions_disabled: discussionsDisabled, gated_notifications_mode: gatedNotificationsMode, gated_notifications_email: gatedNotificationsEmail };
|
|
380
|
+
return hfApi(huggingFaceToken, { method: 'PUT', url: `${HOSTS.HUB}/api/datasets/${repoId}/settings`, queryParams, body });
|
|
381
|
+
},
|
|
382
|
+
});
|
|
383
|
+
//# sourceMappingURL=datasets.js.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const huggingFaceChangeDiscussionsStatus: import("ai").Tool<{
|
|
2
|
+
status: "open" | "closed";
|
|
3
|
+
repo: string;
|
|
4
|
+
namespace: string;
|
|
5
|
+
num: string;
|
|
6
|
+
repoType: "models" | "spaces" | "datasets";
|
|
7
|
+
comment?: string | undefined;
|
|
8
|
+
huggingFaceToken?: string | undefined;
|
|
9
|
+
}, any>;
|
|
10
|
+
export declare const huggingFaceCreateDiscussions: import("ai").Tool<{
|
|
11
|
+
description: string;
|
|
12
|
+
title: string;
|
|
13
|
+
repo: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
repoType: "models" | "spaces" | "datasets";
|
|
16
|
+
huggingFaceToken?: string | undefined;
|
|
17
|
+
pullRequest?: boolean | undefined;
|
|
18
|
+
}, any>;
|
|
19
|
+
export declare const huggingFaceCreateDiscussionsComment: import("ai").Tool<{
|
|
20
|
+
repo: string;
|
|
21
|
+
namespace: string;
|
|
22
|
+
comment: string;
|
|
23
|
+
num: string;
|
|
24
|
+
repoType: "models" | "spaces" | "datasets";
|
|
25
|
+
huggingFaceToken?: string | undefined;
|
|
26
|
+
}, any>;
|
|
27
|
+
export declare const huggingFaceCreateDiscussionsPin: import("ai").Tool<{
|
|
28
|
+
repo: string;
|
|
29
|
+
namespace: string;
|
|
30
|
+
num: string;
|
|
31
|
+
repoType: "models" | "spaces" | "datasets";
|
|
32
|
+
pinned: boolean;
|
|
33
|
+
huggingFaceToken?: string | undefined;
|
|
34
|
+
}, any>;
|
|
35
|
+
export declare const huggingFaceDeleteDiscussions: import("ai").Tool<{
|
|
36
|
+
repo: string;
|
|
37
|
+
namespace: string;
|
|
38
|
+
num: string;
|
|
39
|
+
repoType: "models" | "spaces" | "datasets";
|
|
40
|
+
huggingFaceToken?: string | undefined;
|
|
41
|
+
}, any>;
|
|
42
|
+
export declare const huggingFaceGetDiscussion: import("ai").Tool<{
|
|
43
|
+
repoType: "models" | "spaces" | "datasets";
|
|
44
|
+
repoId: string;
|
|
45
|
+
discussionNum: number;
|
|
46
|
+
huggingFaceToken?: string | undefined;
|
|
47
|
+
}, any>;
|
|
48
|
+
export declare const huggingFaceListDiscussions: import("ai").Tool<{
|
|
49
|
+
repo: string;
|
|
50
|
+
namespace: string;
|
|
51
|
+
repoType: "models" | "spaces" | "datasets";
|
|
52
|
+
type?: "all" | "pull_request" | "discussion" | undefined;
|
|
53
|
+
sort?: "reactions" | "trending" | "recently-created" | undefined;
|
|
54
|
+
status?: "all" | "open" | "closed" | undefined;
|
|
55
|
+
search?: string | undefined;
|
|
56
|
+
author?: string | undefined;
|
|
57
|
+
huggingFaceToken?: string | undefined;
|
|
58
|
+
p?: number | undefined;
|
|
59
|
+
}, any>;
|
|
60
|
+
export declare const huggingFaceUpdateDiscussionsTitle: import("ai").Tool<{
|
|
61
|
+
title: string;
|
|
62
|
+
repo: string;
|
|
63
|
+
namespace: string;
|
|
64
|
+
num: string;
|
|
65
|
+
repoType: "models" | "spaces" | "datasets";
|
|
66
|
+
huggingFaceToken?: string | undefined;
|
|
67
|
+
}, any>;
|
|
68
|
+
//# sourceMappingURL=discussions.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { hfApi, HOSTS } from './client.js';
|
|
5
|
+
import { repoIdOf as _r, uiPrefix as _u } from './client.js';
|
|
6
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
7
|
+
function repoIdOf(namespace, repo, repoId) { return _r(namespace, repo, repoId); }
|
|
8
|
+
function uiPrefix(repoType) { return _u(repoType); }
|
|
9
|
+
export const huggingFaceChangeDiscussionsStatus = tool({
|
|
10
|
+
description: "Tool to change the status of a Hugging Face repository discussion. Use when you need to open or close discussions on models, datasets, or spaces.",
|
|
11
|
+
inputSchema: z.object({
|
|
12
|
+
huggingFaceToken: tokenField,
|
|
13
|
+
num: z.string().describe("The discussion number or ID to change the status of. This is the numeric identifier of the discussion thread."),
|
|
14
|
+
repo: z.string().describe("The repository name where the discussion exists. For example, 'bert-base-uncased' or 'my-dataset'."),
|
|
15
|
+
status: z.enum(["open", "closed"]).describe("The new status to set for the discussion. Use 'open' to reopen a closed discussion or 'closed' to close an open discussion."),
|
|
16
|
+
comment: z.string().max(65536).optional().describe("Optional comment to add when changing the status. Useful for explaining why the discussion is being closed or reopened."),
|
|
17
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository. For example, 'google-bert' or 'huggingface'."),
|
|
18
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository where the discussion exists. Must be one of: models, spaces, or datasets."),
|
|
19
|
+
}),
|
|
20
|
+
execute: async ({ huggingFaceToken, num, repo, status, comment, namespace, repoType }) => {
|
|
21
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
22
|
+
const queryParams = undefined;
|
|
23
|
+
const body = { status: status, comment: comment };
|
|
24
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(num)}/status`, queryParams, body });
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const huggingFaceCreateDiscussions = tool({
|
|
28
|
+
description: "Tool to create a new discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to start a conversation, report an issue, or create a pull request discussion.",
|
|
29
|
+
inputSchema: z.object({
|
|
30
|
+
huggingFaceToken: tokenField,
|
|
31
|
+
repo: z.string().describe("The name of the repository where the discussion will be created."),
|
|
32
|
+
title: z.string().min(3).max(200).describe("The title of the discussion. Must be between 3 and 200 characters."),
|
|
33
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository."),
|
|
34
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository: models, spaces, or datasets. This determines where the discussion will be created."),
|
|
35
|
+
description: z.string().max(65536).describe("The description/content of the discussion. Can contain markdown formatting. Maximum 65536 characters."),
|
|
36
|
+
pullRequest: z.boolean().optional().describe("Whether this discussion should be created as a pull request. If true, creates a PR instead of a regular discussion."),
|
|
37
|
+
}),
|
|
38
|
+
execute: async ({ huggingFaceToken, repo, title, namespace, repoType, description, pullRequest }) => {
|
|
39
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
40
|
+
const queryParams = undefined;
|
|
41
|
+
const body = { title: title, description: description, pull_request: pullRequest };
|
|
42
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions`, queryParams, body });
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export const huggingFaceCreateDiscussionsComment = tool({
|
|
46
|
+
description: "Tool to create a new comment on a Hugging Face repository discussion. Use when you need to add comments or replies to discussions on models, datasets, or spaces.",
|
|
47
|
+
inputSchema: z.object({
|
|
48
|
+
huggingFaceToken: tokenField,
|
|
49
|
+
num: z.string().describe("The discussion number or ID to comment on. This is the numeric identifier of the discussion thread."),
|
|
50
|
+
repo: z.string().describe("The repository name where the discussion exists. For example, 'gpt2' or 'my-dataset'."),
|
|
51
|
+
comment: z.string().min(1).max(65536).describe("The comment text to post on the discussion. Must be between 1 and 65536 characters."),
|
|
52
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository. For example, 'openai-community' or 'huggingface'."),
|
|
53
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository where the discussion exists. Must be one of: models, spaces, or datasets."),
|
|
54
|
+
}),
|
|
55
|
+
execute: async ({ huggingFaceToken, num, repo, comment, namespace, repoType }) => {
|
|
56
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
57
|
+
const queryParams = undefined;
|
|
58
|
+
const body = { comment: comment };
|
|
59
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(num)}/comment`, queryParams, body });
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const huggingFaceCreateDiscussionsPin = tool({
|
|
63
|
+
description: "Tool to pin or unpin a discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to highlight important discussions by pinning them to the top of the list, or unpin them when they're no longer priority.",
|
|
64
|
+
inputSchema: z.object({
|
|
65
|
+
huggingFaceToken: tokenField,
|
|
66
|
+
num: z.string().describe("The discussion number/identifier to pin or unpin. This is the numeric ID shown in the discussion URL."),
|
|
67
|
+
repo: z.string().describe("The name of the repository containing the discussion. For example, for 'meta-llama/Llama-2-7b', the repo is 'Llama-2-7b'."),
|
|
68
|
+
pinned: z.boolean().describe("Whether to pin (true) or unpin (false) the discussion. Pinned discussions appear at the top of the discussions list."),
|
|
69
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository. For example, for 'meta-llama/Llama-2-7b', the namespace is 'meta-llama'."),
|
|
70
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository: models, spaces, or datasets. This determines which repository type contains the discussion."),
|
|
71
|
+
}),
|
|
72
|
+
execute: async ({ huggingFaceToken, num, repo, pinned, namespace, repoType }) => {
|
|
73
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
74
|
+
const queryParams = undefined;
|
|
75
|
+
const body = { pinned: pinned };
|
|
76
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(num)}/pin`, queryParams, body });
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
export const huggingFaceDeleteDiscussions = tool({
|
|
80
|
+
description: "Tool to delete a discussion from a Hugging Face repository. Use when you need to remove a discussion that is no longer needed. This action permanently removes the specified discussion from the repository.",
|
|
81
|
+
inputSchema: z.object({
|
|
82
|
+
huggingFaceToken: tokenField,
|
|
83
|
+
num: z.string().describe("The discussion number to delete. This is the unique identifier of the discussion within the repository."),
|
|
84
|
+
repo: z.string().describe("The name of the repository containing the discussion to delete. This is the repository identifier without the namespace."),
|
|
85
|
+
namespace: z.string().describe("The namespace (user or organization) that owns the repository. For example, '121tester' for a user or 'huggingface' for an organization."),
|
|
86
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository where the discussion exists. Must be one of: models, spaces, or datasets."),
|
|
87
|
+
}),
|
|
88
|
+
execute: async ({ huggingFaceToken, num, repo, namespace, repoType }) => {
|
|
89
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
90
|
+
const queryParams = undefined;
|
|
91
|
+
return hfApi(huggingFaceToken, { method: 'DELETE', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(num)}`, queryParams });
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
export const huggingFaceGetDiscussion = tool({
|
|
95
|
+
description: "Tool to get detailed information about a specific discussion or pull request on Hugging Face Hub. Use when you need to retrieve all comments, status changes, events, and for PRs, the diff information.",
|
|
96
|
+
inputSchema: z.object({
|
|
97
|
+
huggingFaceToken: tokenField,
|
|
98
|
+
repoId: z.string().describe("Repository ID in the format author/repo-name (e.g., 'google-bert/bert-base-uncased')."),
|
|
99
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository: models, spaces, or datasets. This determines where to look for the discussion."),
|
|
100
|
+
discussionNum: z.number().int().min(1).describe("Discussion number (strictly positive integer). This is the unique identifier of the discussion within the repository."),
|
|
101
|
+
}),
|
|
102
|
+
execute: async ({ huggingFaceToken, repoId, repoType, discussionNum }) => {
|
|
103
|
+
const queryParams = undefined;
|
|
104
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(discussionNum)}`, queryParams });
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
export const huggingFaceListDiscussions = tool({
|
|
108
|
+
description: "Tool to list discussions for a Hugging Face repository. Use when you need to retrieve discussions or pull requests for a specific model, dataset, or space.",
|
|
109
|
+
inputSchema: z.object({
|
|
110
|
+
huggingFaceToken: tokenField,
|
|
111
|
+
p: z.number().int().min(0).optional().describe("Page number for pagination. Starts from 0 for the first page."),
|
|
112
|
+
repo: z.string().describe("The repository name to list discussions from."),
|
|
113
|
+
sort: z.enum(["recently-created", "trending", "reactions"]).optional().describe("Sort type enum."),
|
|
114
|
+
type: z.enum(["all", "discussion", "pull_request"]).optional().describe("Discussion type enum."),
|
|
115
|
+
author: z.string().optional().describe("Filter discussions by author username."),
|
|
116
|
+
search: z.string().optional().describe("Search query to filter discussions by title or content."),
|
|
117
|
+
status: z.enum(["all", "open", "closed"]).optional().describe("Discussion status enum."),
|
|
118
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository."),
|
|
119
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("Type of repository to list discussions from: models, spaces, or datasets."),
|
|
120
|
+
}),
|
|
121
|
+
execute: async ({ huggingFaceToken, p, repo, sort, type, author, search, status, namespace, repoType }) => {
|
|
122
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
123
|
+
const queryParams = { p: p, author: author, search: search, sort: sort, status: status, type: type };
|
|
124
|
+
return hfApi(huggingFaceToken, { method: 'GET', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions`, queryParams });
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
export const huggingFaceUpdateDiscussionsTitle = tool({
|
|
128
|
+
description: "Tool to change the title of an existing discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to update or correct a discussion's title.",
|
|
129
|
+
inputSchema: z.object({
|
|
130
|
+
huggingFaceToken: tokenField,
|
|
131
|
+
num: z.string().describe("The discussion number/identifier to update the title for."),
|
|
132
|
+
repo: z.string().describe("The name of the repository where the discussion is located."),
|
|
133
|
+
title: z.string().min(3).max(200).describe("The new title for the discussion. Must be between 3 and 200 characters."),
|
|
134
|
+
namespace: z.string().describe("The namespace (username or organization) that owns the repository."),
|
|
135
|
+
repoType: z.enum(["models", "spaces", "datasets"]).describe("The type of repository: models, spaces, or datasets. This determines where the discussion is located."),
|
|
136
|
+
}),
|
|
137
|
+
execute: async ({ huggingFaceToken, num, repo, title, namespace, repoType }) => {
|
|
138
|
+
const repoId = repoIdOf(namespace, repo, undefined);
|
|
139
|
+
const queryParams = undefined;
|
|
140
|
+
const body = { title: title };
|
|
141
|
+
return hfApi(huggingFaceToken, { method: 'POST', url: `${HOSTS.HUB}/api/${repoType}/${repoId}/discussions/${encodeURIComponent(num)}/title`, queryParams, body });
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
//# sourceMappingURL=discussions.js.map
|