@surph_ai/sdk 0.0.12 → 0.0.14

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 (61) hide show
  1. package/deploy/index.js +50 -140
  2. package/deploy/tool-handler.js +19 -0
  3. package/index.js +97 -34
  4. package/package.json +4 -5
  5. package/scaffold/index.js +32 -14
  6. package/scaffold/tool/package.json +10 -5
  7. package/scaffold/tool/tools/index.ts +9 -0
  8. package/toolserver/routes/tool.js +21 -18
  9. package/utils/index.js +0 -1
  10. package/base/vinely-base/.nvmrc +0 -1
  11. package/base/vinely-base/README.md +0 -30
  12. package/base/vinely-base/app.js +0 -5
  13. package/base/vinely-base/declarations.d.ts +0 -1
  14. package/base/vinely-base/package.json +0 -103
  15. package/base/vinely-base/public/css/globals-2.css +0 -3699
  16. package/base/vinely-base/public/css/globals.css +0 -3695
  17. package/base/vinely-base/public/js/app.js +0 -1
  18. package/base/vinely-base/public/js/jquery.js +0 -2
  19. package/base/vinely-base/scratch.js +0 -21
  20. package/base/vinely-base/src/client/components/app-sidebar.tsx +0 -59
  21. package/base/vinely-base/src/client/components/assistant-ui/markdown-text.tsx +0 -153
  22. package/base/vinely-base/src/client/components/assistant-ui/thread-list.tsx +0 -67
  23. package/base/vinely-base/src/client/components/assistant-ui/thread.tsx +0 -666
  24. package/base/vinely-base/src/client/components/assistant-ui/tool-fallback.tsx +0 -44
  25. package/base/vinely-base/src/client/components/assistant-ui/tooltip-icon-button.tsx +0 -44
  26. package/base/vinely-base/src/client/components/ui/breadcrumb.tsx +0 -109
  27. package/base/vinely-base/src/client/components/ui/button.tsx +0 -59
  28. package/base/vinely-base/src/client/components/ui/input.tsx +0 -21
  29. package/base/vinely-base/src/client/components/ui/separator.tsx +0 -28
  30. package/base/vinely-base/src/client/components/ui/sheet.tsx +0 -139
  31. package/base/vinely-base/src/client/components/ui/sidebar.tsx +0 -726
  32. package/base/vinely-base/src/client/components/ui/skeleton.tsx +0 -14
  33. package/base/vinely-base/src/client/components/ui/tooltip.tsx +0 -61
  34. package/base/vinely-base/src/client/components/vines-sidebar.tsx +0 -182
  35. package/base/vinely-base/src/client/contexts/SessionContext.tsx +0 -28
  36. package/base/vinely-base/src/client/contexts/SessionReducer.tsx +0 -32
  37. package/base/vinely-base/src/client/hooks/use-mobile.ts +0 -19
  38. package/base/vinely-base/src/client/index.tsx +0 -154
  39. package/base/vinely-base/src/client/lib/API.ts +0 -155
  40. package/base/vinely-base/src/client/lib/RPC.ts +0 -49
  41. package/base/vinely-base/src/client/lib/utils.ts +0 -96
  42. package/base/vinely-base/src/server/index.ts +0 -63
  43. package/base/vinely-base/src/server/routes/api.ts +0 -38
  44. package/base/vinely-base/src/server/routes/chat.ts +0 -133
  45. package/base/vinely-base/src/server/routes/main.ts +0 -36
  46. package/base/vinely-base/src/server/routes/mcp.ts +0 -52
  47. package/base/vinely-base/src/server/routes/rpc.ts +0 -64
  48. package/base/vinely-base/src/server/routes/thread.ts +0 -44
  49. package/base/vinely-base/src/server/utils/APIMgr.ts +0 -156
  50. package/base/vinely-base/src/server/utils/Auth.ts +0 -235
  51. package/base/vinely-base/src/server/utils/fetchManifest.ts +0 -15
  52. package/base/vinely-base/src/server/utils/mcp-auth.ts +0 -251
  53. package/base/vinely-base/tsconfig.json +0 -16
  54. package/base/vinely-base/views/landing.html +0 -187
  55. package/base/vinely-base/views/partials/imports.dev.html +0 -3
  56. package/base/vinely-base/webpack.config.js +0 -112
  57. package/deploy/Dockerfile +0 -9
  58. package/scaffold/tool/package-lock.json +0 -2459
  59. package/scaffold/tool/tools/index.js +0 -8
  60. package/utils/Realm.js +0 -60
  61. package/utils/http.js +0 -22
@@ -1,8 +0,0 @@
1
- // Your tools code goes here. When ready to get, register
2
- // tool name in exports at bottom of this file:
3
-
4
- module.exports = {
5
- demo: (args) => {
6
- return `this is a sample tool: ${JSON.stringify(args)}`
7
- }
8
- }
package/utils/Realm.js DELETED
@@ -1,60 +0,0 @@
1
- const axios = require('axios')
2
-
3
- const CDN = (process.env.ENV === 'dev') ? '' : process.env.CDN
4
-
5
- const queryParamsToString = (query) => {
6
- const keys = Object.keys(query)
7
- const lastIndex = keys.length - 1
8
- let queryString = ''
9
- keys.forEach((key, i) => {
10
- queryString += `${key}=${query[key]}`
11
- if (i !== lastIndex)
12
- queryString += '&'
13
- })
14
-
15
- return queryString
16
- }
17
-
18
- const webhooks = {
19
- rest: 'https://us-east-1.aws.data.mongodb-api.com/app/portal-atlas-extzu/endpoint/rest'
20
- // rest: 'https://us-east-1.aws.data.mongodb-api.com/app/application-0-zfvva/endpoint/rest',
21
- // queries: process.env.WEBHOOK,
22
- }
23
-
24
- const restQuery = async (Resource, method = 'get', params = null) => {
25
- const httpMethod = method.toLowerCase()
26
- let url = webhooks.rest
27
-
28
- if (httpMethod === 'get' || httpMethod === 'delete') {
29
- if (params) {
30
- const queryString = queryParamsToString(params)
31
- url = `${url}?${queryString}`
32
- }
33
- }
34
-
35
- const request = {
36
- url,
37
- method: httpMethod,
38
- headers: {
39
- Accept: 'application/json',
40
- Resource,
41
- }
42
- }
43
-
44
- if (httpMethod === 'post' || httpMethod === 'put') {
45
- request.data = params
46
- }
47
-
48
- const payload = await axios(request)
49
- if (payload.data.confirmation !== 'success') {
50
- throw new Error(payload.data.message || 'Something went wrong.')
51
- }
52
-
53
- const { data } = payload.data
54
- return data
55
- }
56
-
57
- module.exports = {
58
- webhooks,
59
- restQuery,
60
- }
package/utils/http.js DELETED
@@ -1,22 +0,0 @@
1
- const axios = require('axios')
2
-
3
- module.exports = {
4
-
5
- post: async (url, data) => {
6
- const { data } = await axios({
7
- url,
8
- data,
9
- method: 'post',
10
- headers: {
11
- 'Content-Type': 'application/zip'
12
- }
13
- })
14
-
15
- return data
16
- },
17
-
18
- get: async () => {
19
-
20
- }
21
-
22
- }