@elastic.io/mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +171 -0
  3. package/dist/api/client.d.ts +12 -0
  4. package/dist/api/client.d.ts.map +1 -0
  5. package/dist/api/client.js +124 -0
  6. package/dist/api/client.js.map +1 -0
  7. package/dist/api/jsonapi.d.ts +28 -0
  8. package/dist/api/jsonapi.d.ts.map +1 -0
  9. package/dist/api/jsonapi.js +45 -0
  10. package/dist/api/jsonapi.js.map +1 -0
  11. package/dist/api/logger.d.ts +9 -0
  12. package/dist/api/logger.d.ts.map +1 -0
  13. package/dist/api/logger.js +46 -0
  14. package/dist/api/logger.js.map +1 -0
  15. package/dist/api/samples.d.ts +21 -0
  16. package/dist/api/samples.d.ts.map +1 -0
  17. package/dist/api/samples.js +465 -0
  18. package/dist/api/samples.js.map +1 -0
  19. package/dist/config.d.ts +16 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +49 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/embeddings/factory.d.ts +7 -0
  24. package/dist/embeddings/factory.d.ts.map +1 -0
  25. package/dist/embeddings/factory.js +25 -0
  26. package/dist/embeddings/factory.js.map +1 -0
  27. package/dist/embeddings/google.d.ts +19 -0
  28. package/dist/embeddings/google.d.ts.map +1 -0
  29. package/dist/embeddings/google.js +132 -0
  30. package/dist/embeddings/google.js.map +1 -0
  31. package/dist/embeddings/types.d.ts +27 -0
  32. package/dist/embeddings/types.d.ts.map +1 -0
  33. package/dist/embeddings/types.js +2 -0
  34. package/dist/embeddings/types.js.map +1 -0
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +226 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/paths.d.ts +3 -0
  40. package/dist/paths.d.ts.map +1 -0
  41. package/dist/paths.js +10 -0
  42. package/dist/paths.js.map +1 -0
  43. package/dist/server.d.ts +29 -0
  44. package/dist/server.d.ts.map +1 -0
  45. package/dist/server.js +361 -0
  46. package/dist/server.js.map +1 -0
  47. package/dist/tools/confirmation.d.ts +41 -0
  48. package/dist/tools/confirmation.d.ts.map +1 -0
  49. package/dist/tools/confirmation.js +120 -0
  50. package/dist/tools/confirmation.js.map +1 -0
  51. package/dist/tools/constants.d.ts +31 -0
  52. package/dist/tools/constants.d.ts.map +1 -0
  53. package/dist/tools/constants.js +85 -0
  54. package/dist/tools/constants.js.map +1 -0
  55. package/dist/tools/definitions.d.ts +3 -0
  56. package/dist/tools/definitions.d.ts.map +1 -0
  57. package/dist/tools/definitions.js +883 -0
  58. package/dist/tools/definitions.js.map +1 -0
  59. package/dist/tools/handlers/auth.d.ts +3 -0
  60. package/dist/tools/handlers/auth.d.ts.map +1 -0
  61. package/dist/tools/handlers/auth.js +540 -0
  62. package/dist/tools/handlers/auth.js.map +1 -0
  63. package/dist/tools/handlers/component.d.ts +3 -0
  64. package/dist/tools/handlers/component.d.ts.map +1 -0
  65. package/dist/tools/handlers/component.js +145 -0
  66. package/dist/tools/handlers/component.js.map +1 -0
  67. package/dist/tools/handlers/data-sample.d.ts +3 -0
  68. package/dist/tools/handlers/data-sample.d.ts.map +1 -0
  69. package/dist/tools/handlers/data-sample.js +51 -0
  70. package/dist/tools/handlers/data-sample.js.map +1 -0
  71. package/dist/tools/handlers/dynamic.d.ts +3 -0
  72. package/dist/tools/handlers/dynamic.d.ts.map +1 -0
  73. package/dist/tools/handlers/dynamic.js +110 -0
  74. package/dist/tools/handlers/dynamic.js.map +1 -0
  75. package/dist/tools/handlers/flow.d.ts +9 -0
  76. package/dist/tools/handlers/flow.d.ts.map +1 -0
  77. package/dist/tools/handlers/flow.js +899 -0
  78. package/dist/tools/handlers/flow.js.map +1 -0
  79. package/dist/tools/handlers/log.d.ts +3 -0
  80. package/dist/tools/handlers/log.d.ts.map +1 -0
  81. package/dist/tools/handlers/log.js +61 -0
  82. package/dist/tools/handlers/log.js.map +1 -0
  83. package/dist/tools/handlers/organization.d.ts +3 -0
  84. package/dist/tools/handlers/organization.d.ts.map +1 -0
  85. package/dist/tools/handlers/organization.js +39 -0
  86. package/dist/tools/handlers/organization.js.map +1 -0
  87. package/dist/tools/handlers/raw.d.ts +3 -0
  88. package/dist/tools/handlers/raw.d.ts.map +1 -0
  89. package/dist/tools/handlers/raw.js +77 -0
  90. package/dist/tools/handlers/raw.js.map +1 -0
  91. package/dist/tools/handlers/search.d.ts +3 -0
  92. package/dist/tools/handlers/search.d.ts.map +1 -0
  93. package/dist/tools/handlers/search.js +82 -0
  94. package/dist/tools/handlers/search.js.map +1 -0
  95. package/dist/tools/handlers/session.d.ts +3 -0
  96. package/dist/tools/handlers/session.d.ts.map +1 -0
  97. package/dist/tools/handlers/session.js +15 -0
  98. package/dist/tools/handlers/session.js.map +1 -0
  99. package/dist/tools/handlers.d.ts +12 -0
  100. package/dist/tools/handlers.d.ts.map +1 -0
  101. package/dist/tools/handlers.js +197 -0
  102. package/dist/tools/handlers.js.map +1 -0
  103. package/dist/tools/helpers.d.ts +45 -0
  104. package/dist/tools/helpers.d.ts.map +1 -0
  105. package/dist/tools/helpers.js +195 -0
  106. package/dist/tools/helpers.js.map +1 -0
  107. package/dist/tools/types.d.ts +32 -0
  108. package/dist/tools/types.d.ts.map +1 -0
  109. package/dist/tools/types.js +2 -0
  110. package/dist/tools/types.js.map +1 -0
  111. package/dist/tools/validation.d.ts +24 -0
  112. package/dist/tools/validation.d.ts.map +1 -0
  113. package/dist/tools/validation.js +748 -0
  114. package/dist/tools/validation.js.map +1 -0
  115. package/dist/types/index.d.ts +47 -0
  116. package/dist/types/index.d.ts.map +1 -0
  117. package/dist/types/index.js +2 -0
  118. package/dist/types/index.js.map +1 -0
  119. package/dist/vectorstore/factory.d.ts +7 -0
  120. package/dist/vectorstore/factory.d.ts.map +1 -0
  121. package/dist/vectorstore/factory.js +25 -0
  122. package/dist/vectorstore/factory.js.map +1 -0
  123. package/dist/vectorstore/qdrant.d.ts +11 -0
  124. package/dist/vectorstore/qdrant.d.ts.map +1 -0
  125. package/dist/vectorstore/qdrant.js +107 -0
  126. package/dist/vectorstore/qdrant.js.map +1 -0
  127. package/dist/vectorstore/types.d.ts +28 -0
  128. package/dist/vectorstore/types.d.ts.map +1 -0
  129. package/dist/vectorstore/types.js +2 -0
  130. package/dist/vectorstore/types.js.map +1 -0
  131. package/package.json +51 -0
  132. package/resources/docs/component-test-scenarios.md +2468 -0
  133. package/resources/docs/credential-validation-gaps.md +35 -0
  134. package/resources/docs/debug-issues.md +71 -0
  135. package/resources/docs/deployment-and-scaling.md +136 -0
  136. package/resources/docs/flow-building-guide.md +565 -0
  137. package/resources/docs/packaging-plan.md +84 -0
  138. package/resources/docs/standardized-components-guide.md +66 -0
  139. package/resources/docs/system-instructions.md +177 -0
  140. package/resources/docs/unique-components.md +60 -0
  141. package/resources/docs/verified-creds-flow-ids.md +193 -0
  142. package/resources/flow-examples/batch-flow-1-collect.json +51 -0
  143. package/resources/flow-examples/batch-flow-2-process.json +70 -0
  144. package/resources/flow-examples/code-component-transform.json +65 -0
  145. package/resources/flow-examples/code-component-trigger.json +52 -0
  146. package/resources/flow-examples/code-component-with-credentials-trigger.json +53 -0
  147. package/resources/flow-examples/code-component-with-credentials.json +67 -0
  148. package/resources/flow-examples/filter-step.json +63 -0
  149. package/resources/flow-examples/polling-sync-trigger.json +50 -0
  150. package/resources/flow-examples/router-branching.json +94 -0
  151. package/resources/flow-examples/splitter-re-assemble.json +72 -0
  152. package/resources/flow-examples/splitter-split.json +68 -0
  153. package/resources/flow-examples/timer-query-action-sync.json +68 -0
  154. package/resources/flow-examples/webhook-async-sync.json +49 -0
  155. package/resources/flow-examples/webhook-request-reply.json +63 -0
@@ -0,0 +1,68 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Splitter Split",
6
+ "description": "Splitting a list/array of items into multiple individual messages to process downstream steps one-by-one (looping).",
7
+ "type": "ordinary",
8
+ "graph": {
9
+ "nodes": [
10
+ {
11
+ "id": "step_1",
12
+ "component_id": "generic_source_component_id",
13
+ "command": "generic-source-team/generic-source-repo:listObjects@latestVersionId",
14
+ "name": "Get Customer Array",
15
+ "credentials_id": "SOURCE_CREDENTIAL_ID_PLACEHOLDER"
16
+ },
17
+ {
18
+ "id": "step_2",
19
+ "component_id": "splitter_component_id",
20
+ "command": "elasticio/splitter:splitOnJsonataExpression@latestVersionId",
21
+ "name": "Split List",
22
+ "fields": {
23
+ "expression": "$getPassthrough().step_1.body.customers"
24
+ }
25
+ },
26
+ {
27
+ "id": "step_3",
28
+ "component_id": "generic_target_component_id",
29
+ "command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
30
+ "name": "Create Single Contact",
31
+ "credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
32
+ }
33
+ ],
34
+ "edges": [
35
+ {
36
+ "id": "mapper:step_1:step_2",
37
+ "source": "step_1",
38
+ "target": "step_2",
39
+ "config": {
40
+ "mapper_type": "jsonata",
41
+ "mapper": {}
42
+ }
43
+ },
44
+ {
45
+ "id": "mapper:step_2:step_3",
46
+ "source": "step_2",
47
+ "target": "step_3",
48
+ "config": {
49
+ "mapper_type": "jsonata",
50
+ "mapper": {
51
+ "name": "$getPassthrough().step_2.body.name",
52
+ "email": "$getPassthrough().step_2.body.email"
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "relationships": {
60
+ "workspace": {
61
+ "data": {
62
+ "type": "workspace",
63
+ "id": "YOUR_WORKSPACE_ID"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Timer Query Sync",
6
+ "description": "Scheduled sync using Simple Trigger (Timer) passing the lastPoll timestamp to a custom query action (e.g. SQL select).",
7
+ "type": "ordinary",
8
+ "cron": "0 * * * *",
9
+ "graph": {
10
+ "nodes": [
11
+ {
12
+ "id": "step_1",
13
+ "component_id": "aaa1111111bbb2222222ccc01",
14
+ "command": "elasticio/simple-trigger-component:timer@latestVersionId",
15
+ "name": "Timer Schedule"
16
+ },
17
+ {
18
+ "id": "step_2",
19
+ "component_id": "jdbc_component_id",
20
+ "command": "elasticio/jdbc:newSelectAction@latestVersionId",
21
+ "name": "Query Source Database",
22
+ "credentials_id": "DATABASE_CREDENTIAL_ID_PLACEHOLDER",
23
+ "fields": {
24
+ "sqlQuery": "SELECT * FROM customers WHERE updated_at > @last_modified_at:string"
25
+ }
26
+ },
27
+ {
28
+ "id": "step_3",
29
+ "component_id": "generic_target_component_id",
30
+ "command": "generic-target-team/generic-target-repo:upsertObject@latestVersionId",
31
+ "name": "Sync to Target",
32
+ "secret_id": "TARGET_SECRET_ID_PLACEHOLDER"
33
+ }
34
+ ],
35
+ "edges": [
36
+ {
37
+ "id": "mapper:step_1:step_2",
38
+ "source": "step_1",
39
+ "target": "step_2",
40
+ "config": {
41
+ "mapper_type": "jsonata",
42
+ "mapper": {
43
+ "last_modified_at": "$getPassthrough().step_1.body.lastPoll"
44
+ }
45
+ }
46
+ },
47
+ {
48
+ "id": "mapper:step_2:step_3",
49
+ "source": "step_2",
50
+ "target": "step_3",
51
+ "config": {
52
+ "mapper_type": "jsonata",
53
+ "mapper": "{\n \"Name\": $getPassthrough().step_2.body.name,\n \"Email\": $getPassthrough().step_2.body.email,\n \"External_ID__c\": $getPassthrough().step_2.body.id\n}"
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "relationships": {
60
+ "workspace": {
61
+ "data": {
62
+ "type": "workspace",
63
+ "id": "YOUR_WORKSPACE_ID"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Webhook Async Sync",
6
+ "description": "Asynchronous webhook receiver mapping incoming payloads directly to a target action.",
7
+ "type": "ordinary",
8
+ "graph": {
9
+ "nodes": [
10
+ {
11
+ "id": "step_1",
12
+ "component_id": "webhook_component_id",
13
+ "command": "elasticio/webhook:receive@latestVersionId",
14
+ "name": "Webhook Event Trigger"
15
+ },
16
+ {
17
+ "id": "step_2",
18
+ "component_id": "generic_target_component_id",
19
+ "command": "generic-target-team/generic-target-repo:createObject@latestVersionId",
20
+ "name": "Create Target Record",
21
+ "credentials_id": "TARGET_CREDENTIAL_ID_PLACEHOLDER"
22
+ }
23
+ ],
24
+ "edges": [
25
+ {
26
+ "id": "mapper:step_1:step_2",
27
+ "source": "step_1",
28
+ "target": "step_2",
29
+ "config": {
30
+ "mapper_type": "jsonata",
31
+ "mapper": {
32
+ "recordName": "$getPassthrough().step_1.body.eventName",
33
+ "details": "$getPassthrough().step_1.body.description"
34
+ }
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ "relationships": {
41
+ "workspace": {
42
+ "data": {
43
+ "type": "workspace",
44
+ "id": "YOUR_WORKSPACE_ID"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "data": {
3
+ "type": "flow",
4
+ "attributes": {
5
+ "name": "Abstract Webhook Request Reply",
6
+ "description": "Synchronous Request-Reply REST API flow. Starts with a Webhook Trigger, executes query/lookup steps, and sends a custom HTTP response via the HTTP Reply component.",
7
+ "type": "ordinary",
8
+ "graph": {
9
+ "nodes": [
10
+ {
11
+ "id": "step_1",
12
+ "component_id": "webhook_component_id",
13
+ "command": "elasticio/webhook:receive@latestVersionId",
14
+ "name": "HTTP API Request"
15
+ },
16
+ {
17
+ "id": "step_2",
18
+ "component_id": "crm_component_id",
19
+ "command": "generic-target-team/generic-target-repo:lookupObjectById@latestVersionId",
20
+ "name": "Lookup CRM Contact",
21
+ "secret_id": "CRM_SECRET_ID_PLACEHOLDER"
22
+ },
23
+ {
24
+ "id": "step_3",
25
+ "component_id": "http_reply_component_id",
26
+ "command": "elasticio/request-reply:reply@latestVersionId",
27
+ "name": "Send API Response"
28
+ }
29
+ ],
30
+ "edges": [
31
+ {
32
+ "id": "mapper:step_1:step_2",
33
+ "source": "step_1",
34
+ "target": "step_2",
35
+ "config": {
36
+ "mapper_type": "jsonata",
37
+ "mapper": {
38
+ "id": "$getPassthrough().step_1.body.query.contactId"
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "id": "mapper:step_2:step_3",
44
+ "source": "step_2",
45
+ "target": "step_3",
46
+ "config": {
47
+ "mapper_type": "jsonata",
48
+ "mapper": "{\n \"statusCode\": 200,\n \"contentType\": \"application/json\",\n \"responseBody\": $string({\n \"success\": true,\n \"contact\": {\n \"id\": $getPassthrough().step_2.body.Id,\n \"name\": $getPassthrough().step_2.body.Name,\n \"phone\": $getPassthrough().step_2.body.Phone\n }\n })\n}"
49
+ }
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ "relationships": {
55
+ "workspace": {
56
+ "data": {
57
+ "type": "workspace",
58
+ "id": "YOUR_WORKSPACE_ID"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }