@rnsk/toolkits 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +7 -1
  2. package/dist/index.d.ts +7 -1
  3. package/dist/index.js +13 -1
  4. package/dist/toolkits/hacker-news/icon.d.ts +5 -0
  5. package/dist/toolkits/hacker-news/icon.js +9 -0
  6. package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
  7. package/dist/toolkits/hacker-news/manifest.js +25 -0
  8. package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
  9. package/dist/toolkits/hacker-news/tools/client.js +51 -0
  10. package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
  11. package/dist/toolkits/hacker-news/tools/index.js +22 -0
  12. package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
  13. package/dist/toolkits/hacker-news/tools/items.js +126 -0
  14. package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
  15. package/dist/toolkits/hacker-news/tools/search.js +40 -0
  16. package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
  17. package/dist/toolkits/hacker-news/tools/stories.js +98 -0
  18. package/dist/toolkits/hostinger/icon.d.ts +5 -0
  19. package/dist/toolkits/hostinger/icon.js +6 -0
  20. package/dist/toolkits/hostinger/manifest.d.ts +3 -0
  21. package/dist/toolkits/hostinger/manifest.js +36 -0
  22. package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
  23. package/dist/toolkits/hostinger/tools/billing.js +35 -0
  24. package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
  25. package/dist/toolkits/hostinger/tools/client.js +57 -0
  26. package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
  27. package/dist/toolkits/hostinger/tools/dns.js +47 -0
  28. package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
  29. package/dist/toolkits/hostinger/tools/domains.js +62 -0
  30. package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
  31. package/dist/toolkits/hostinger/tools/hosting.js +38 -0
  32. package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
  33. package/dist/toolkits/hostinger/tools/index.js +35 -0
  34. package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
  35. package/dist/toolkits/hostinger/tools/vps.js +77 -0
  36. package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
  37. package/dist/toolkits/hostinger/tools/whois.js +85 -0
  38. package/dist/toolkits/hugging-face/icon.d.ts +5 -0
  39. package/dist/toolkits/hugging-face/icon.js +6 -0
  40. package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
  41. package/dist/toolkits/hugging-face/manifest.js +42 -0
  42. package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
  43. package/dist/toolkits/hugging-face/tools/client.js +192 -0
  44. package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
  45. package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
  46. package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
  47. package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
  48. package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
  49. package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
  50. package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
  51. package/dist/toolkits/hugging-face/tools/index.js +163 -0
  52. package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
  53. package/dist/toolkits/hugging-face/tools/inference.js +86 -0
  54. package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
  55. package/dist/toolkits/hugging-face/tools/models.js +273 -0
  56. package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
  57. package/dist/toolkits/hugging-face/tools/papers.js +91 -0
  58. package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
  59. package/dist/toolkits/hugging-face/tools/repos.js +201 -0
  60. package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
  61. package/dist/toolkits/hugging-face/tools/settings.js +88 -0
  62. package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
  63. package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
  64. package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
  65. package/dist/toolkits/hugging-face/tools/sql.js +47 -0
  66. package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
  67. package/dist/toolkits/hugging-face/tools/users.js +132 -0
  68. package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
  69. package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
  70. package/dist/toolkits/jira/icon.d.ts +5 -0
  71. package/dist/toolkits/jira/icon.js +6 -0
  72. package/dist/toolkits/jira/manifest.d.ts +3 -0
  73. package/dist/toolkits/jira/manifest.js +53 -0
  74. package/dist/toolkits/jira/tools/boards.d.ts +52 -0
  75. package/dist/toolkits/jira/tools/boards.js +104 -0
  76. package/dist/toolkits/jira/tools/client.d.ts +23 -0
  77. package/dist/toolkits/jira/tools/client.js +270 -0
  78. package/dist/toolkits/jira/tools/index.d.ts +1280 -0
  79. package/dist/toolkits/jira/tools/index.js +119 -0
  80. package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
  81. package/dist/toolkits/jira/tools/issue-fields.js +111 -0
  82. package/dist/toolkits/jira/tools/issues.d.ts +304 -0
  83. package/dist/toolkits/jira/tools/issues.js +593 -0
  84. package/dist/toolkits/jira/tools/meta.d.ts +212 -0
  85. package/dist/toolkits/jira/tools/meta.js +369 -0
  86. package/dist/toolkits/jira/tools/projects.d.ts +130 -0
  87. package/dist/toolkits/jira/tools/projects.js +263 -0
  88. package/dist/toolkits/jira/tools/search.d.ts +90 -0
  89. package/dist/toolkits/jira/tools/search.js +181 -0
  90. package/dist/toolkits/jira/tools/users.d.ts +114 -0
  91. package/dist/toolkits/jira/tools/users.js +221 -0
  92. package/dist/toolkits/neo4j/icon.d.ts +5 -0
  93. package/dist/toolkits/neo4j/icon.js +6 -0
  94. package/dist/toolkits/neo4j/manifest.d.ts +3 -0
  95. package/dist/toolkits/neo4j/manifest.js +33 -0
  96. package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
  97. package/dist/toolkits/neo4j/tools/analytics.js +91 -0
  98. package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
  99. package/dist/toolkits/neo4j/tools/client.js +105 -0
  100. package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
  101. package/dist/toolkits/neo4j/tools/index.js +30 -0
  102. package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
  103. package/dist/toolkits/neo4j/tools/instances.js +127 -0
  104. package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
  105. package/dist/toolkits/neo4j/tools/projects.js +110 -0
  106. package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
  107. package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
  108. package/dist/toolkits/neon/icon.d.ts +5 -0
  109. package/dist/toolkits/neon/icon.js +8 -0
  110. package/dist/toolkits/neon/manifest.d.ts +3 -0
  111. package/dist/toolkits/neon/manifest.js +36 -0
  112. package/dist/toolkits/neon/tools/auth.d.ts +115 -0
  113. package/dist/toolkits/neon/tools/auth.js +286 -0
  114. package/dist/toolkits/neon/tools/branches.d.ts +189 -0
  115. package/dist/toolkits/neon/tools/branches.js +465 -0
  116. package/dist/toolkits/neon/tools/client.d.ts +10 -0
  117. package/dist/toolkits/neon/tools/client.js +69 -0
  118. package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
  119. package/dist/toolkits/neon/tools/dataapi.js +111 -0
  120. package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
  121. package/dist/toolkits/neon/tools/endpoints.js +163 -0
  122. package/dist/toolkits/neon/tools/index.d.ts +976 -0
  123. package/dist/toolkits/neon/tools/index.js +130 -0
  124. package/dist/toolkits/neon/tools/meta.d.ts +4 -0
  125. package/dist/toolkits/neon/tools/meta.js +16 -0
  126. package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
  127. package/dist/toolkits/neon/tools/orgs.js +303 -0
  128. package/dist/toolkits/neon/tools/projects.d.ts +177 -0
  129. package/dist/toolkits/neon/tools/projects.js +468 -0
  130. package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
  131. package/dist/toolkits/neon/tools/snapshots.js +67 -0
  132. package/package.json +1 -1
@@ -0,0 +1,91 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ import { auraRequest } from './client.js';
5
+ const tokenField = z.string().optional().describe('Injected by system; do not provide');
6
+ export const neo4jEstimateGdsSessionSize = tool({
7
+ description: 'Estimate GDS session memory and size tier from node/relationship counts and algorithm categories. Use before creating a graph analytics session.',
8
+ inputSchema: z.object({
9
+ neo4jCredentials: tokenField,
10
+ nodeCount: z.number().int().min(0).describe('Number of nodes'),
11
+ relationshipCount: z.number().int().min(0).describe('Number of relationships'),
12
+ nodeLabelCount: z.number().int().min(0).optional().describe('Labels per node'),
13
+ nodePropertyCount: z.number().int().min(0).optional().describe('Properties per node'),
14
+ relationshipPropertyCount: z.number().int().min(0).optional().describe('Properties per relationship'),
15
+ algorithmCategories: z
16
+ .array(z.string())
17
+ .optional()
18
+ .describe("Algorithm categories, e.g. ['pathfinding', 'community_detection', 'centrality', 'similarity', 'link_prediction']"),
19
+ }),
20
+ execute: async ({ neo4jCredentials, nodeCount, relationshipCount, nodeLabelCount, nodePropertyCount, relationshipPropertyCount, algorithmCategories }) => {
21
+ return auraRequest(neo4jCredentials, '/v1/graph-analytics/sessions/sizing', {
22
+ method: 'POST',
23
+ body: {
24
+ node_count: nodeCount,
25
+ relationship_count: relationshipCount,
26
+ node_label_count: nodeLabelCount,
27
+ node_property_count: nodePropertyCount,
28
+ relationship_property_count: relationshipPropertyCount,
29
+ algorithm_categories: algorithmCategories,
30
+ },
31
+ });
32
+ },
33
+ });
34
+ export const neo4jListGdsSessions = tool({
35
+ description: 'List GDS sessions with status, memory, host, and expiry. Optionally filter by instance, tenant, or organization. Read-only.',
36
+ inputSchema: z.object({
37
+ neo4jCredentials: tokenField,
38
+ instanceId: z.string().optional().describe('Filter by instance ID'),
39
+ tenantId: z.string().optional().describe('Filter by project/tenant ID'),
40
+ organizationId: z.string().optional().describe('Filter by organization ID'),
41
+ }),
42
+ execute: async ({ neo4jCredentials, instanceId, tenantId, organizationId }) => {
43
+ return auraRequest(neo4jCredentials, '/v1/graph-analytics/sessions', {
44
+ query: { instance_id: instanceId, tenant_id: tenantId, organization_id: organizationId },
45
+ });
46
+ },
47
+ });
48
+ export const neo4jAggregateDirectors = tool({
49
+ description: 'Count directors via a directorsAggregate GraphQL query. Only use when a GraphQL movies API with a Director type is available; pass the instance ID the data belongs to.',
50
+ inputSchema: z.object({
51
+ neo4jCredentials: tokenField,
52
+ instanceId: z.string().describe('Aura instance ID the request relates to'),
53
+ graphQlEndpoint: z
54
+ .string()
55
+ .describe('GraphQL HTTP endpoint exposing a directorsAggregate query, e.g. "https://example.com/graphql"'),
56
+ }),
57
+ execute: async ({ neo4jCredentials, instanceId, graphQlEndpoint }) => {
58
+ if (!neo4jCredentials) {
59
+ return { error: 'Neo4j Aura API credentials are required. Connect Neo4j first.' };
60
+ }
61
+ let endpoint;
62
+ try {
63
+ endpoint = new URL(graphQlEndpoint);
64
+ }
65
+ catch {
66
+ return { error: 'Invalid graphQlEndpoint. Provide a full HTTP(S) URL.' };
67
+ }
68
+ if (endpoint.protocol !== 'https:' && endpoint.protocol !== 'http:') {
69
+ return { error: 'Invalid graphQlEndpoint. Provide a full HTTP(S) URL.' };
70
+ }
71
+ try {
72
+ const response = await fetch(endpoint.toString(), {
73
+ method: 'POST',
74
+ headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
75
+ body: JSON.stringify({ query: '{ directorsAggregate { count } }', variables: { instanceId } }),
76
+ });
77
+ if (!response.ok) {
78
+ const details = await response.json().catch(() => ({}));
79
+ return { error: `GraphQL request failed with status ${response.status}`, details };
80
+ }
81
+ return await response.json();
82
+ }
83
+ catch (error) {
84
+ return {
85
+ error: 'Error executing directorsAggregate query',
86
+ message: error instanceof Error ? error.message : 'Unknown error',
87
+ };
88
+ }
89
+ },
90
+ });
91
+ //# sourceMappingURL=analytics.js.map
@@ -0,0 +1,6 @@
1
+ export declare function auraRequest(neo4jCredentials: string | undefined, path: string, options?: {
2
+ method?: string;
3
+ query?: Record<string, string | number | boolean | undefined>;
4
+ body?: unknown;
5
+ }): Promise<any>;
6
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,105 @@
1
+ // @ts-nocheck
2
+ const AURA_API = 'https://api.neo4j.io';
3
+ const TOKEN_URL = `${AURA_API}/oauth/token`;
4
+ const tokenCache = new Map();
5
+ function credentialsOf(neo4jCredentials) {
6
+ const idx = (neo4jCredentials ?? '').indexOf(':');
7
+ if (idx <= 0)
8
+ return null;
9
+ return {
10
+ clientId: neo4jCredentials.slice(0, idx),
11
+ clientSecret: neo4jCredentials.slice(idx + 1),
12
+ };
13
+ }
14
+ async function getAccessToken(neo4jCredentials) {
15
+ const cached = tokenCache.get(neo4jCredentials);
16
+ if (cached && cached.expiresAt > Date.now() + 60_000)
17
+ return cached.token;
18
+ const creds = credentialsOf(neo4jCredentials);
19
+ if (!creds)
20
+ return null;
21
+ const basic = Buffer.from(`${creds.clientId}:${creds.clientSecret}`).toString('base64');
22
+ const response = await fetch(TOKEN_URL, {
23
+ method: 'POST',
24
+ headers: {
25
+ Authorization: `Basic ${basic}`,
26
+ 'Content-Type': 'application/x-www-form-urlencoded',
27
+ },
28
+ body: 'grant_type=client_credentials',
29
+ });
30
+ if (!response.ok)
31
+ return null;
32
+ const data = await response.json().catch(() => null);
33
+ if (!data?.access_token)
34
+ return null;
35
+ tokenCache.set(neo4jCredentials, {
36
+ token: data.access_token,
37
+ expiresAt: Date.now() + (data.expires_in ?? 3600) * 1000,
38
+ });
39
+ return data.access_token;
40
+ }
41
+ export async function auraRequest(neo4jCredentials, path, options = {}) {
42
+ if (!neo4jCredentials) {
43
+ return { error: 'Neo4j Aura API credentials are required. Connect Neo4j first.' };
44
+ }
45
+ if (!credentialsOf(neo4jCredentials)) {
46
+ return { error: 'Invalid Neo4j credentials. Expected "clientId:clientSecret". Reconnect Neo4j.' };
47
+ }
48
+ const params = new URLSearchParams();
49
+ if (options.query) {
50
+ for (const [key, value] of Object.entries(options.query)) {
51
+ if (value !== undefined && value !== null && value !== '') {
52
+ params.append(key, String(value));
53
+ }
54
+ }
55
+ }
56
+ const qs = params.toString();
57
+ const url = `${AURA_API}${path}${qs ? `?${qs}` : ''}`;
58
+ try {
59
+ const doFetch = async (token) => fetch(url, {
60
+ method: options.method ?? 'GET',
61
+ headers: {
62
+ Authorization: `Bearer ${token}`,
63
+ 'Content-Type': 'application/json',
64
+ Accept: 'application/json',
65
+ },
66
+ body: options.body !== undefined ? JSON.stringify(options.body) : undefined,
67
+ });
68
+ let token = await getAccessToken(neo4jCredentials);
69
+ if (!token) {
70
+ return { error: 'Failed to authenticate with Neo4j Aura API. Check your client ID and secret.' };
71
+ }
72
+ let response = await doFetch(token);
73
+ if (response.status === 401 || response.status === 403) {
74
+ tokenCache.delete(neo4jCredentials);
75
+ token = await getAccessToken(neo4jCredentials);
76
+ if (!token) {
77
+ return { error: 'Failed to authenticate with Neo4j Aura API. Check your client ID and secret.' };
78
+ }
79
+ response = await doFetch(token);
80
+ }
81
+ if (!response.ok) {
82
+ const details = await response.json().catch(() => ({}));
83
+ return { error: `Neo4j Aura API request failed with status ${response.status}`, details };
84
+ }
85
+ if (response.status === 204 || response.status === 202) {
86
+ const text = await response.text();
87
+ if (!text)
88
+ return { success: true, status: response.status };
89
+ try {
90
+ return JSON.parse(text);
91
+ }
92
+ catch {
93
+ return { success: true, status: response.status };
94
+ }
95
+ }
96
+ return await response.json();
97
+ }
98
+ catch (error) {
99
+ return {
100
+ error: 'Error calling Neo4j Aura API',
101
+ message: error instanceof Error ? error.message : 'Unknown error',
102
+ };
103
+ }
104
+ }
105
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1,198 @@
1
+ import { neo4jCreateInstanceBeta, neo4jGetInstanceBeta, neo4jListInstancesBeta, neo4jUpdateInstance, neo4jUpdateInstanceBeta, neo4jPauseInstanceBeta } from './instances.js';
2
+ import { neo4jCreateSnapshot, neo4jGetSnapshot, neo4jListSnapshots, neo4jRestoreSnapshot } from './snapshots.js';
3
+ import { neo4jGetProject, neo4jGetProjectBeta, neo4jListProjects, neo4jListProjectUsers, neo4jGetOrganizationUser, neo4jListIpFilters, neo4jUpdateIpFilter, neo4jListAgents } from './projects.js';
4
+ import { neo4jEstimateGdsSessionSize, neo4jListGdsSessions, neo4jAggregateDirectors } from './analytics.js';
5
+ export { neo4jCreateInstanceBeta, neo4jGetInstanceBeta, neo4jListInstancesBeta, neo4jUpdateInstance, neo4jUpdateInstanceBeta, neo4jPauseInstanceBeta, neo4jCreateSnapshot, neo4jGetSnapshot, neo4jListSnapshots, neo4jRestoreSnapshot, neo4jGetProject, neo4jGetProjectBeta, neo4jListProjects, neo4jListProjectUsers, neo4jGetOrganizationUser, neo4jListIpFilters, neo4jUpdateIpFilter, neo4jListAgents, neo4jEstimateGdsSessionSize, neo4jListGdsSessions, neo4jAggregateDirectors, };
6
+ export declare const neo4jTools: ({
7
+ name: string;
8
+ description: string;
9
+ tool: import("ai").Tool<{
10
+ type: "enterprise-db" | "enterprise-ds" | "business-critical" | "professional-db" | "professional-ds" | "free-db";
11
+ version: string;
12
+ name: string;
13
+ region: string;
14
+ memory: string;
15
+ tenantId: string;
16
+ cloudProvider: "aws" | "gcp" | "azure";
17
+ neo4jCredentials?: string | undefined;
18
+ storage?: string | undefined;
19
+ vectorOptimized?: boolean | undefined;
20
+ graphAnalyticsPlugin?: boolean | undefined;
21
+ sourceInstanceId?: string | undefined;
22
+ sourceSnapshotId?: string | undefined;
23
+ customerManagedKeyId?: string | undefined;
24
+ }, any>;
25
+ requiredAuth: "neo4jCredentials";
26
+ scope: "write";
27
+ } | {
28
+ name: string;
29
+ description: string;
30
+ tool: import("ai").Tool<{
31
+ instanceId: string;
32
+ neo4jCredentials?: string | undefined;
33
+ }, any>;
34
+ requiredAuth: "neo4jCredentials";
35
+ scope: "read";
36
+ } | {
37
+ name: string;
38
+ description: string;
39
+ tool: import("ai").Tool<{
40
+ neo4jCredentials?: string | undefined;
41
+ tenantId?: string | undefined;
42
+ }, any>;
43
+ requiredAuth: "neo4jCredentials";
44
+ scope: "read";
45
+ } | {
46
+ name: string;
47
+ description: string;
48
+ tool: import("ai").Tool<{
49
+ instanceId: string;
50
+ name?: string | undefined;
51
+ neo4jCredentials?: string | undefined;
52
+ memory?: string | undefined;
53
+ storage?: string | undefined;
54
+ vectorOptimized?: boolean | undefined;
55
+ graphAnalyticsPlugin?: boolean | undefined;
56
+ }, any>;
57
+ requiredAuth: "neo4jCredentials";
58
+ scope: "write";
59
+ } | {
60
+ name: string;
61
+ description: string;
62
+ tool: import("ai").Tool<{
63
+ instanceId: string;
64
+ neo4jCredentials?: string | undefined;
65
+ }, any>;
66
+ requiredAuth: "neo4jCredentials";
67
+ scope: "write";
68
+ } | {
69
+ name: string;
70
+ description: string;
71
+ tool: import("ai").Tool<{
72
+ instanceId: string;
73
+ snapshotId: string;
74
+ neo4jCredentials?: string | undefined;
75
+ }, any>;
76
+ requiredAuth: "neo4jCredentials";
77
+ scope: "read";
78
+ } | {
79
+ name: string;
80
+ description: string;
81
+ tool: import("ai").Tool<{
82
+ instanceId: string;
83
+ date?: string | undefined;
84
+ neo4jCredentials?: string | undefined;
85
+ }, any>;
86
+ requiredAuth: "neo4jCredentials";
87
+ scope: "read";
88
+ } | {
89
+ name: string;
90
+ description: string;
91
+ tool: import("ai").Tool<{
92
+ instanceId: string;
93
+ snapshotId: string;
94
+ neo4jCredentials?: string | undefined;
95
+ }, any>;
96
+ requiredAuth: "neo4jCredentials";
97
+ scope: "write";
98
+ } | {
99
+ name: string;
100
+ description: string;
101
+ tool: import("ai").Tool<{
102
+ tenantId: string;
103
+ neo4jCredentials?: string | undefined;
104
+ }, any>;
105
+ requiredAuth: "neo4jCredentials";
106
+ scope: "read";
107
+ } | {
108
+ name: string;
109
+ description: string;
110
+ tool: import("ai").Tool<{
111
+ neo4jCredentials?: string | undefined;
112
+ }, any>;
113
+ requiredAuth: "neo4jCredentials";
114
+ scope: "read";
115
+ } | {
116
+ name: string;
117
+ description: string;
118
+ tool: import("ai").Tool<{
119
+ projectId: string;
120
+ organizationId: string;
121
+ neo4jCredentials?: string | undefined;
122
+ }, any>;
123
+ requiredAuth: "neo4jCredentials";
124
+ scope: "read";
125
+ } | {
126
+ name: string;
127
+ description: string;
128
+ tool: import("ai").Tool<{
129
+ userId: string;
130
+ organizationId: string;
131
+ neo4jCredentials?: string | undefined;
132
+ }, any>;
133
+ requiredAuth: "neo4jCredentials";
134
+ scope: "read";
135
+ } | {
136
+ name: string;
137
+ description: string;
138
+ tool: import("ai").Tool<{
139
+ organizationId: string;
140
+ neo4jCredentials?: string | undefined;
141
+ }, any>;
142
+ requiredAuth: "neo4jCredentials";
143
+ scope: "read";
144
+ } | {
145
+ name: string;
146
+ description: string;
147
+ tool: import("ai").Tool<{
148
+ organizationId: string;
149
+ ipFilterId: string;
150
+ description?: string | undefined;
151
+ name?: string | undefined;
152
+ neo4jCredentials?: string | undefined;
153
+ allowList?: {
154
+ address: string;
155
+ prefixLen: number;
156
+ description?: string | undefined;
157
+ }[] | undefined;
158
+ filteringDisabled?: boolean | undefined;
159
+ }, any>;
160
+ requiredAuth: "neo4jCredentials";
161
+ scope: "write";
162
+ } | {
163
+ name: string;
164
+ description: string;
165
+ tool: import("ai").Tool<{
166
+ nodeCount: number;
167
+ relationshipCount: number;
168
+ neo4jCredentials?: string | undefined;
169
+ nodeLabelCount?: number | undefined;
170
+ nodePropertyCount?: number | undefined;
171
+ relationshipPropertyCount?: number | undefined;
172
+ algorithmCategories?: string[] | undefined;
173
+ }, any>;
174
+ requiredAuth: "neo4jCredentials";
175
+ scope: "read";
176
+ } | {
177
+ name: string;
178
+ description: string;
179
+ tool: import("ai").Tool<{
180
+ instanceId?: string | undefined;
181
+ neo4jCredentials?: string | undefined;
182
+ tenantId?: string | undefined;
183
+ organizationId?: string | undefined;
184
+ }, any>;
185
+ requiredAuth: "neo4jCredentials";
186
+ scope: "read";
187
+ } | {
188
+ name: string;
189
+ description: string;
190
+ tool: import("ai").Tool<{
191
+ instanceId: string;
192
+ graphQlEndpoint: string;
193
+ neo4jCredentials?: string | undefined;
194
+ }, any>;
195
+ requiredAuth: "neo4jCredentials";
196
+ scope: "read";
197
+ })[];
198
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,30 @@
1
+ // @ts-nocheck
2
+ import { neo4jCreateInstanceBeta, neo4jGetInstanceBeta, neo4jListInstancesBeta, neo4jUpdateInstance, neo4jUpdateInstanceBeta, neo4jPauseInstanceBeta, } from './instances.js';
3
+ import { neo4jCreateSnapshot, neo4jGetSnapshot, neo4jListSnapshots, neo4jRestoreSnapshot } from './snapshots.js';
4
+ import { neo4jGetProject, neo4jGetProjectBeta, neo4jListProjects, neo4jListProjectUsers, neo4jGetOrganizationUser, neo4jListIpFilters, neo4jUpdateIpFilter, neo4jListAgents, } from './projects.js';
5
+ import { neo4jEstimateGdsSessionSize, neo4jListGdsSessions, neo4jAggregateDirectors } from './analytics.js';
6
+ export { neo4jCreateInstanceBeta, neo4jGetInstanceBeta, neo4jListInstancesBeta, neo4jUpdateInstance, neo4jUpdateInstanceBeta, neo4jPauseInstanceBeta, neo4jCreateSnapshot, neo4jGetSnapshot, neo4jListSnapshots, neo4jRestoreSnapshot, neo4jGetProject, neo4jGetProjectBeta, neo4jListProjects, neo4jListProjectUsers, neo4jGetOrganizationUser, neo4jListIpFilters, neo4jUpdateIpFilter, neo4jListAgents, neo4jEstimateGdsSessionSize, neo4jListGdsSessions, neo4jAggregateDirectors, };
7
+ export const neo4jTools = [
8
+ { name: 'Neo4jCreateInstanceBeta', description: neo4jCreateInstanceBeta.description, tool: neo4jCreateInstanceBeta, requiredAuth: 'neo4jCredentials', scope: 'write' },
9
+ { name: 'Neo4jGetInstanceBeta', description: neo4jGetInstanceBeta.description, tool: neo4jGetInstanceBeta, requiredAuth: 'neo4jCredentials', scope: 'read' },
10
+ { name: 'Neo4jListInstancesBeta', description: neo4jListInstancesBeta.description, tool: neo4jListInstancesBeta, requiredAuth: 'neo4jCredentials', scope: 'read' },
11
+ { name: 'Neo4jUpdateInstance', description: neo4jUpdateInstance.description, tool: neo4jUpdateInstance, requiredAuth: 'neo4jCredentials', scope: 'write' },
12
+ { name: 'Neo4jUpdateInstanceBeta', description: neo4jUpdateInstanceBeta.description, tool: neo4jUpdateInstanceBeta, requiredAuth: 'neo4jCredentials', scope: 'write' },
13
+ { name: 'Neo4jPauseInstanceBeta', description: neo4jPauseInstanceBeta.description, tool: neo4jPauseInstanceBeta, requiredAuth: 'neo4jCredentials', scope: 'write' },
14
+ { name: 'Neo4jCreateSnapshot', description: neo4jCreateSnapshot.description, tool: neo4jCreateSnapshot, requiredAuth: 'neo4jCredentials', scope: 'write' },
15
+ { name: 'Neo4jGetSnapshot', description: neo4jGetSnapshot.description, tool: neo4jGetSnapshot, requiredAuth: 'neo4jCredentials', scope: 'read' },
16
+ { name: 'Neo4jListSnapshots', description: neo4jListSnapshots.description, tool: neo4jListSnapshots, requiredAuth: 'neo4jCredentials', scope: 'read' },
17
+ { name: 'Neo4jRestoreSnapshot', description: neo4jRestoreSnapshot.description, tool: neo4jRestoreSnapshot, requiredAuth: 'neo4jCredentials', scope: 'write' },
18
+ { name: 'Neo4jGetProject', description: neo4jGetProject.description, tool: neo4jGetProject, requiredAuth: 'neo4jCredentials', scope: 'read' },
19
+ { name: 'Neo4jGetProjectBeta', description: neo4jGetProjectBeta.description, tool: neo4jGetProjectBeta, requiredAuth: 'neo4jCredentials', scope: 'read' },
20
+ { name: 'Neo4jListProjects', description: neo4jListProjects.description, tool: neo4jListProjects, requiredAuth: 'neo4jCredentials', scope: 'read' },
21
+ { name: 'Neo4jListProjectUsers', description: neo4jListProjectUsers.description, tool: neo4jListProjectUsers, requiredAuth: 'neo4jCredentials', scope: 'read' },
22
+ { name: 'Neo4jGetOrganizationUser', description: neo4jGetOrganizationUser.description, tool: neo4jGetOrganizationUser, requiredAuth: 'neo4jCredentials', scope: 'read' },
23
+ { name: 'Neo4jListIpFilters', description: neo4jListIpFilters.description, tool: neo4jListIpFilters, requiredAuth: 'neo4jCredentials', scope: 'read' },
24
+ { name: 'Neo4jUpdateIpFilter', description: neo4jUpdateIpFilter.description, tool: neo4jUpdateIpFilter, requiredAuth: 'neo4jCredentials', scope: 'write' },
25
+ { name: 'Neo4jListAgents', description: neo4jListAgents.description, tool: neo4jListAgents, requiredAuth: 'neo4jCredentials', scope: 'read' },
26
+ { name: 'Neo4jEstimateGdsSessionSize', description: neo4jEstimateGdsSessionSize.description, tool: neo4jEstimateGdsSessionSize, requiredAuth: 'neo4jCredentials', scope: 'read' },
27
+ { name: 'Neo4jListGdsSessions', description: neo4jListGdsSessions.description, tool: neo4jListGdsSessions, requiredAuth: 'neo4jCredentials', scope: 'read' },
28
+ { name: 'Neo4jAggregateDirectors', description: neo4jAggregateDirectors.description, tool: neo4jAggregateDirectors, requiredAuth: 'neo4jCredentials', scope: 'read' },
29
+ ];
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,47 @@
1
+ export declare const neo4jCreateInstanceBeta: import("ai").Tool<{
2
+ type: "enterprise-db" | "enterprise-ds" | "business-critical" | "professional-db" | "professional-ds" | "free-db";
3
+ version: string;
4
+ name: string;
5
+ region: string;
6
+ memory: string;
7
+ tenantId: string;
8
+ cloudProvider: "aws" | "gcp" | "azure";
9
+ neo4jCredentials?: string | undefined;
10
+ storage?: string | undefined;
11
+ vectorOptimized?: boolean | undefined;
12
+ graphAnalyticsPlugin?: boolean | undefined;
13
+ sourceInstanceId?: string | undefined;
14
+ sourceSnapshotId?: string | undefined;
15
+ customerManagedKeyId?: string | undefined;
16
+ }, any>;
17
+ export declare const neo4jGetInstanceBeta: import("ai").Tool<{
18
+ instanceId: string;
19
+ neo4jCredentials?: string | undefined;
20
+ }, any>;
21
+ export declare const neo4jListInstancesBeta: import("ai").Tool<{
22
+ neo4jCredentials?: string | undefined;
23
+ tenantId?: string | undefined;
24
+ }, any>;
25
+ export declare const neo4jUpdateInstance: import("ai").Tool<{
26
+ instanceId: string;
27
+ name?: string | undefined;
28
+ neo4jCredentials?: string | undefined;
29
+ memory?: string | undefined;
30
+ storage?: string | undefined;
31
+ vectorOptimized?: boolean | undefined;
32
+ graphAnalyticsPlugin?: boolean | undefined;
33
+ }, any>;
34
+ export declare const neo4jUpdateInstanceBeta: import("ai").Tool<{
35
+ instanceId: string;
36
+ name?: string | undefined;
37
+ neo4jCredentials?: string | undefined;
38
+ memory?: string | undefined;
39
+ storage?: string | undefined;
40
+ vectorOptimized?: boolean | undefined;
41
+ graphAnalyticsPlugin?: boolean | undefined;
42
+ }, any>;
43
+ export declare const neo4jPauseInstanceBeta: import("ai").Tool<{
44
+ instanceId: string;
45
+ neo4jCredentials?: string | undefined;
46
+ }, any>;
47
+ //# sourceMappingURL=instances.d.ts.map
@@ -0,0 +1,127 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ import { auraRequest } from './client.js';
5
+ const tokenField = z.string().optional().describe('Injected by system; do not provide');
6
+ const instanceIdField = z.string().describe('Aura instance ID');
7
+ const instanceTypeEnum = z.enum(['enterprise-db', 'enterprise-ds', 'business-critical', 'professional-db', 'professional-ds', 'free-db']);
8
+ const cloudProviderEnum = z.enum(['gcp', 'aws', 'azure']);
9
+ export const neo4jCreateInstanceBeta = tool({
10
+ description: 'Create a new Neo4j Aura instance (v1beta5). Provisioning is asynchronous (202 Accepted). Save the returned username and password securely; they cannot be retrieved again.',
11
+ inputSchema: z.object({
12
+ neo4jCredentials: tokenField,
13
+ name: z.string().min(1).max(30).describe('Instance name, max 30 chars'),
14
+ type: instanceTypeEnum.describe('Instance type'),
15
+ memory: z.string().describe("Memory size, e.g. '1GB'"),
16
+ region: z.string().describe("Region, e.g. 'europe-west1'"),
17
+ tenantId: z.string().describe('Project/tenant ID to create the instance in'),
18
+ version: z.string().describe("Neo4j version, e.g. '5'"),
19
+ cloudProvider: cloudProviderEnum.describe('Cloud provider'),
20
+ storage: z.string().optional().describe("Storage size, e.g. '10GB'"),
21
+ vectorOptimized: z.boolean().optional().describe('Enable vector optimization'),
22
+ graphAnalyticsPlugin: z.boolean().optional().describe('Enable graph analytics plugin'),
23
+ sourceInstanceId: z.string().optional().describe('Source instance ID when cloning'),
24
+ sourceSnapshotId: z.string().optional().describe('Snapshot ID to create from (requires sourceInstanceId)'),
25
+ customerManagedKeyId: z.string().optional().describe('Customer managed key ID'),
26
+ }),
27
+ execute: async ({ neo4jCredentials, name, type, memory, region, tenantId, version, cloudProvider, storage, vectorOptimized, graphAnalyticsPlugin, sourceInstanceId, sourceSnapshotId, customerManagedKeyId }) => {
28
+ return auraRequest(neo4jCredentials, '/v1beta5/instances', {
29
+ method: 'POST',
30
+ body: {
31
+ name,
32
+ type,
33
+ memory,
34
+ region,
35
+ tenant_id: tenantId,
36
+ version,
37
+ cloud_provider: cloudProvider,
38
+ storage,
39
+ vector_optimized: vectorOptimized,
40
+ graph_analytics_plugin: graphAnalyticsPlugin,
41
+ source_instance_id: sourceInstanceId,
42
+ source_snapshot_id: sourceSnapshotId,
43
+ customer_managed_key_id: customerManagedKeyId,
44
+ },
45
+ });
46
+ },
47
+ });
48
+ export const neo4jGetInstanceBeta = tool({
49
+ description: 'Get details of a Neo4j Aura instance by ID (v1beta5): status, configuration, connection URL. Read-only.',
50
+ inputSchema: z.object({
51
+ neo4jCredentials: tokenField,
52
+ instanceId: instanceIdField,
53
+ }),
54
+ execute: async ({ neo4jCredentials, instanceId }) => {
55
+ return auraRequest(neo4jCredentials, `/v1beta5/instances/${encodeURIComponent(instanceId)}`);
56
+ },
57
+ });
58
+ export const neo4jListInstancesBeta = tool({
59
+ description: 'List Neo4j Aura instances, optionally filtered by tenant. Use to discover available instances.',
60
+ inputSchema: z.object({
61
+ neo4jCredentials: tokenField,
62
+ tenantId: z.string().optional().describe('Filter instances by tenant/project ID'),
63
+ }),
64
+ execute: async ({ neo4jCredentials, tenantId }) => {
65
+ return auraRequest(neo4jCredentials, '/v1beta5/instances', { query: { tenantId } });
66
+ },
67
+ });
68
+ const updateShape = {
69
+ name: z.string().min(1).max(30).optional().describe('New instance name'),
70
+ memory: z.string().optional().describe("New memory size, e.g. '8GB'"),
71
+ storage: z.string().optional().describe("New storage size, e.g. '50GB'"),
72
+ vectorOptimized: z.boolean().optional().describe('Toggle vector optimization'),
73
+ graphAnalyticsPlugin: z.boolean().optional().describe('Toggle graph analytics plugin'),
74
+ };
75
+ export const neo4jUpdateInstance = tool({
76
+ description: 'Update a Neo4j Aura instance (v1): rename, resize memory/storage, toggle vector optimization or analytics plugin. Resizes may process asynchronously.',
77
+ inputSchema: z.object({
78
+ neo4jCredentials: tokenField,
79
+ instanceId: instanceIdField,
80
+ ...updateShape,
81
+ }),
82
+ execute: async ({ neo4jCredentials, instanceId, name, memory, storage, vectorOptimized, graphAnalyticsPlugin }) => {
83
+ return auraRequest(neo4jCredentials, `/v1/instances/${encodeURIComponent(instanceId)}`, {
84
+ method: 'PATCH',
85
+ body: {
86
+ name,
87
+ memory,
88
+ storage,
89
+ vector_optimized: vectorOptimized,
90
+ graph_analytics_plugin: graphAnalyticsPlugin,
91
+ },
92
+ });
93
+ },
94
+ });
95
+ export const neo4jUpdateInstanceBeta = tool({
96
+ description: 'Update a Neo4j Aura instance (v1beta5): rename, resize memory/storage, toggle plugins. May return 202 Accepted for async processing.',
97
+ inputSchema: z.object({
98
+ neo4jCredentials: tokenField,
99
+ instanceId: instanceIdField,
100
+ ...updateShape,
101
+ }),
102
+ execute: async ({ neo4jCredentials, instanceId, name, memory, storage, vectorOptimized, graphAnalyticsPlugin }) => {
103
+ return auraRequest(neo4jCredentials, `/v1beta5/instances/${encodeURIComponent(instanceId)}`, {
104
+ method: 'PATCH',
105
+ body: {
106
+ name,
107
+ memory,
108
+ storage,
109
+ vector_optimized: vectorOptimized,
110
+ graph_analytics_plugin: graphAnalyticsPlugin,
111
+ },
112
+ });
113
+ },
114
+ });
115
+ export const neo4jPauseInstanceBeta = tool({
116
+ description: 'Pause a Neo4j Aura instance to save costs or for maintenance. Asynchronous; resume it later. Fails if another operation (e.g. cloning) is in progress.',
117
+ inputSchema: z.object({
118
+ neo4jCredentials: tokenField,
119
+ instanceId: instanceIdField,
120
+ }),
121
+ execute: async ({ neo4jCredentials, instanceId }) => {
122
+ return auraRequest(neo4jCredentials, `/v1beta5/instances/${encodeURIComponent(instanceId)}/pause`, {
123
+ method: 'POST',
124
+ });
125
+ },
126
+ });
127
+ //# sourceMappingURL=instances.js.map
@@ -0,0 +1,44 @@
1
+ export declare const neo4jGetProject: import("ai").Tool<{
2
+ tenantId: string;
3
+ neo4jCredentials?: string | undefined;
4
+ }, any>;
5
+ export declare const neo4jGetProjectBeta: import("ai").Tool<{
6
+ tenantId: string;
7
+ neo4jCredentials?: string | undefined;
8
+ }, any>;
9
+ export declare const neo4jListProjects: import("ai").Tool<{
10
+ neo4jCredentials?: string | undefined;
11
+ }, any>;
12
+ export declare const neo4jListProjectUsers: import("ai").Tool<{
13
+ projectId: string;
14
+ organizationId: string;
15
+ neo4jCredentials?: string | undefined;
16
+ }, any>;
17
+ export declare const neo4jGetOrganizationUser: import("ai").Tool<{
18
+ userId: string;
19
+ organizationId: string;
20
+ neo4jCredentials?: string | undefined;
21
+ }, any>;
22
+ export declare const neo4jListIpFilters: import("ai").Tool<{
23
+ organizationId: string;
24
+ neo4jCredentials?: string | undefined;
25
+ }, any>;
26
+ export declare const neo4jUpdateIpFilter: import("ai").Tool<{
27
+ organizationId: string;
28
+ ipFilterId: string;
29
+ description?: string | undefined;
30
+ name?: string | undefined;
31
+ neo4jCredentials?: string | undefined;
32
+ allowList?: {
33
+ address: string;
34
+ prefixLen: number;
35
+ description?: string | undefined;
36
+ }[] | undefined;
37
+ filteringDisabled?: boolean | undefined;
38
+ }, any>;
39
+ export declare const neo4jListAgents: import("ai").Tool<{
40
+ projectId: string;
41
+ organizationId: string;
42
+ neo4jCredentials?: string | undefined;
43
+ }, any>;
44
+ //# sourceMappingURL=projects.d.ts.map