@pipeshub-ai/mcp 2.1.0 → 2.3.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 (146) hide show
  1. package/README.md +92 -2
  2. package/bin/mcp-server.js +976 -169
  3. package/bin/mcp-server.js.map +28 -15
  4. package/bin/pipeshub.js +946 -0
  5. package/bin/pipeshub.js.map +14 -0
  6. package/esm/cli/client.d.ts +54 -0
  7. package/esm/cli/client.d.ts.map +1 -0
  8. package/esm/cli/client.js +230 -0
  9. package/esm/cli/client.js.map +1 -0
  10. package/esm/cli/commands.d.ts +30 -0
  11. package/esm/cli/commands.d.ts.map +1 -0
  12. package/esm/cli/commands.js +321 -0
  13. package/esm/cli/commands.js.map +1 -0
  14. package/esm/cli/config.d.ts +73 -0
  15. package/esm/cli/config.d.ts.map +1 -0
  16. package/esm/cli/config.js +218 -0
  17. package/esm/cli/config.js.map +1 -0
  18. package/esm/cli/init-qm.d.ts +11 -0
  19. package/esm/cli/init-qm.d.ts.map +1 -0
  20. package/esm/cli/init-qm.js +170 -0
  21. package/esm/cli/init-qm.js.map +1 -0
  22. package/esm/cli/pipeshub.d.ts +2 -0
  23. package/esm/cli/pipeshub.d.ts.map +1 -0
  24. package/esm/cli/pipeshub.js +296 -0
  25. package/esm/cli/pipeshub.js.map +1 -0
  26. package/esm/funcs/connectorGetRecordContent.d.ts +43 -0
  27. package/esm/funcs/connectorGetRecordContent.d.ts.map +1 -0
  28. package/esm/funcs/connectorGetRecordContent.js +114 -0
  29. package/esm/funcs/connectorGetRecordContent.js.map +1 -0
  30. package/esm/funcs/connectorLookupRecordByIdentifier.d.ts +68 -0
  31. package/esm/funcs/connectorLookupRecordByIdentifier.d.ts.map +1 -0
  32. package/esm/funcs/connectorLookupRecordByIdentifier.js +138 -0
  33. package/esm/funcs/connectorLookupRecordByIdentifier.js.map +1 -0
  34. package/esm/funcs/connectorNavigateKnowledgeGraph.d.ts +75 -0
  35. package/esm/funcs/connectorNavigateKnowledgeGraph.d.ts.map +1 -0
  36. package/esm/funcs/connectorNavigateKnowledgeGraph.js +152 -0
  37. package/esm/funcs/connectorNavigateKnowledgeGraph.js.map +1 -0
  38. package/esm/funcs/conversationsStreamConversation.js +1 -1
  39. package/esm/funcs/conversationsStreamConversation.js.map +1 -1
  40. package/esm/funcs/userGroupsGetAllUserGroups.js +1 -1
  41. package/esm/funcs/userGroupsGetAllUserGroups.js.map +1 -1
  42. package/esm/hooks/registration.d.ts.map +1 -1
  43. package/esm/hooks/registration.js +2 -1
  44. package/esm/hooks/registration.js.map +1 -1
  45. package/esm/hooks/request-context.d.ts +10 -0
  46. package/esm/hooks/request-context.d.ts.map +1 -0
  47. package/esm/hooks/request-context.js +38 -0
  48. package/esm/hooks/request-context.js.map +1 -0
  49. package/esm/hooks/requestid.d.ts +5 -0
  50. package/esm/hooks/requestid.d.ts.map +1 -0
  51. package/esm/hooks/requestid.js +58 -0
  52. package/esm/hooks/requestid.js.map +1 -0
  53. package/esm/lib/base64.d.ts +1 -1
  54. package/esm/lib/base64.d.ts.map +1 -1
  55. package/esm/lib/base64.js +6 -3
  56. package/esm/lib/base64.js.map +1 -1
  57. package/esm/lib/bytes-to-base64.d.ts +16 -0
  58. package/esm/lib/bytes-to-base64.d.ts.map +1 -0
  59. package/esm/lib/bytes-to-base64.js +23 -0
  60. package/esm/lib/bytes-to-base64.js.map +1 -0
  61. package/esm/mcp-server/instructions.d.ts +1 -1
  62. package/esm/mcp-server/instructions.d.ts.map +1 -1
  63. package/esm/mcp-server/instructions.js +62 -9
  64. package/esm/mcp-server/instructions.js.map +1 -1
  65. package/esm/mcp-server/server.d.ts.map +1 -1
  66. package/esm/mcp-server/server.js +10 -3
  67. package/esm/mcp-server/server.js.map +1 -1
  68. package/esm/mcp-server/shared.d.ts +2 -2
  69. package/esm/mcp-server/shared.d.ts.map +1 -1
  70. package/esm/mcp-server/shared.js +7 -3
  71. package/esm/mcp-server/shared.js.map +1 -1
  72. package/esm/mcp-server/tools/_agui.d.ts +34 -0
  73. package/esm/mcp-server/tools/_agui.d.ts.map +1 -0
  74. package/esm/mcp-server/tools/_agui.js +91 -0
  75. package/esm/mcp-server/tools/_agui.js.map +1 -0
  76. package/esm/mcp-server/tools/_helpers.d.ts.map +1 -1
  77. package/esm/mcp-server/tools/_helpers.js +13 -6
  78. package/esm/mcp-server/tools/_helpers.js.map +1 -1
  79. package/esm/mcp-server/tools/pipeshubChat.d.ts +0 -3
  80. package/esm/mcp-server/tools/pipeshubChat.d.ts.map +1 -1
  81. package/esm/mcp-server/tools/pipeshubChat.js +75 -92
  82. package/esm/mcp-server/tools/pipeshubChat.js.map +1 -1
  83. package/esm/mcp-server/tools/pipeshubGetRecordContent.d.ts +125 -0
  84. package/esm/mcp-server/tools/pipeshubGetRecordContent.d.ts.map +1 -0
  85. package/esm/mcp-server/tools/pipeshubGetRecordContent.js +214 -0
  86. package/esm/mcp-server/tools/pipeshubGetRecordContent.js.map +1 -0
  87. package/esm/mcp-server/tools/pipeshubSearch.d.ts.map +1 -1
  88. package/esm/mcp-server/tools/pipeshubSearch.js +22 -5
  89. package/esm/mcp-server/tools/pipeshubSearch.js.map +1 -1
  90. package/esm/mcp-server/tools.d.ts.map +1 -1
  91. package/esm/mcp-server/tools.js +13 -1
  92. package/esm/mcp-server/tools.js.map +1 -1
  93. package/esm/models/availablemodelsresponse.d.ts +1 -1
  94. package/esm/models/conversation.d.ts +1 -1
  95. package/esm/models/getrecordcontentop.d.ts +6 -0
  96. package/esm/models/getrecordcontentop.d.ts.map +1 -0
  97. package/esm/models/getrecordcontentop.js +5 -0
  98. package/esm/models/getrecordcontentop.js.map +1 -0
  99. package/esm/models/lookuprecordbyidentifierop.d.ts +7 -0
  100. package/esm/models/lookuprecordbyidentifierop.d.ts.map +1 -0
  101. package/esm/models/lookuprecordbyidentifierop.js +14 -0
  102. package/esm/models/lookuprecordbyidentifierop.js.map +1 -0
  103. package/esm/models/navigateknowledgegraphop.d.ts +14 -0
  104. package/esm/models/navigateknowledgegraphop.d.ts.map +1 -0
  105. package/esm/models/navigateknowledgegraphop.js +25 -0
  106. package/esm/models/navigateknowledgegraphop.js.map +1 -0
  107. package/esm/models/userteamsresponse.d.ts +1 -1
  108. package/esm/tool-names.d.ts.map +1 -1
  109. package/esm/tool-names.js +6 -2
  110. package/esm/tool-names.js.map +1 -1
  111. package/package.json +4 -2
  112. package/qm/README.md +247 -0
  113. package/qm/SECURITY.md +134 -0
  114. package/qm/TROUBLESHOOTING.md +218 -0
  115. package/qm/qm.config.fragment.jsonc +42 -0
  116. package/qm/sandbox/Dockerfile +22 -0
  117. package/qm/sandbox/skills/pipeshub/SKILL.md +69 -0
  118. package/qm/sandbox/tools/pipeshub/tool.json +36 -0
  119. package/src/cli/client.ts +272 -0
  120. package/src/cli/commands.ts +403 -0
  121. package/src/cli/config.ts +229 -0
  122. package/src/cli/init-qm.ts +215 -0
  123. package/src/cli/pipeshub.ts +333 -0
  124. package/src/funcs/connectorGetRecordContent.ts +179 -0
  125. package/src/funcs/connectorLookupRecordByIdentifier.ts +200 -0
  126. package/src/funcs/connectorNavigateKnowledgeGraph.ts +215 -0
  127. package/src/funcs/conversationsStreamConversation.ts +1 -1
  128. package/src/funcs/userGroupsGetAllUserGroups.ts +1 -1
  129. package/src/hooks/registration.ts +2 -1
  130. package/src/hooks/request-context.ts +47 -0
  131. package/src/hooks/requestid.ts +62 -0
  132. package/src/lib/base64.ts +6 -3
  133. package/src/lib/bytes-to-base64.ts +24 -0
  134. package/src/mcp-server/instructions.ts +62 -9
  135. package/src/mcp-server/server.ts +11 -3
  136. package/src/mcp-server/shared.ts +7 -3
  137. package/src/mcp-server/tools/_agui.ts +138 -0
  138. package/src/mcp-server/tools/_helpers.ts +13 -6
  139. package/src/mcp-server/tools/pipeshubChat.ts +78 -91
  140. package/src/mcp-server/tools/pipeshubGetRecordContent.ts +251 -0
  141. package/src/mcp-server/tools/pipeshubSearch.ts +22 -5
  142. package/src/mcp-server/tools.ts +14 -1
  143. package/src/models/getrecordcontentop.ts +11 -0
  144. package/src/models/lookuprecordbyidentifierop.ts +26 -0
  145. package/src/models/navigateknowledgegraphop.ts +56 -0
  146. package/src/tool-names.ts +6 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorGetRecordContent.js","sourceRoot":"","sources":["../../src/funcs/connectorGetRecordContent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAEL,iCAAiC,GAClC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAqB,EACrB,OAAgC,EAChC,OAAwB;IAaxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,OAAO,EACP,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,OAAqB,EACrB,OAAgC,EAChC,OAAwB;IAgBxB,MAAM,OAAO,GAAG,SAAS,CACvB,OAAO,EACP,CAAC,MAAM,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,CAAC,MAAM,CAAC,EAC3D,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAC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EAAE,KAAK;QACX,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,SAAS;QACrC,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS;eACtD,CAAC,CAAC;KACR,EAAE,OAAO,CAAC,CAAC;IACZ,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;IAE9B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,OAAO;QACP,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { PipeshubCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { APIError } from "../models/errors/apierror.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
+ import { LookupRecordByIdentifierRequest } from "../models/lookuprecordbyidentifierop.js";
7
+ import { APIPromise } from "../types/async.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Resolve a URL, issue key or external ID to a Record ID
11
+ *
12
+ * @remarks
13
+ * Turn an external reference into the matching PipesHub record. Accepts a
14
+ * pasted link, a Jira-style issue key, or a bare external system ID from
15
+ * any connected source. Repeat `identifiers` to batch-resolve up to ten
16
+ * in one call.
17
+ *
18
+ * The response carries a rendered `text` view — each match's metadata
19
+ * block followed by a `Next:` line naming a follow-up call. The structured
20
+ * fields carry the same information for programmatic use.
21
+ *
22
+ * **Accepted identifiers**
23
+ * - Jira issue URL — `https://acme.atlassian.net/browse/PA-1787`
24
+ * - Jira issue key — `PA-1787`
25
+ * - Confluence page URL —
26
+ * `https://acme.atlassian.net/wiki/spaces/SD/pages/450625553/Agent+Loop`
27
+ * - Google Drive / Docs URL — `https://docs.google.com/document/d/1AbC.../edit`
28
+ * - Slack message link — `https://acme.slack.com/archives/C0123/p1720000000000100`
29
+ * - Bare external system ID — `450625553`
30
+ *
31
+ * **When to use this vs. the other record endpoints:**
32
+ * - **This endpoint** converts an *external* reference into an internal
33
+ * Record ID. Reach for it whenever you meet a link or ticket key and
34
+ * need the record behind it.
35
+ * - `GET /connectors/record/{recordId}/content` reads a record you have
36
+ * already identified. It needs an internal Record ID, which is exactly
37
+ * what this endpoint returns.
38
+ * - `GET /connectors/navigate` browses the hierarchy when you have a
39
+ * position in the tree rather than a specific identifier.
40
+ *
41
+ * **Typical flow:** call this with the reference, take a match's `id`
42
+ * from the response, then call
43
+ * `GET /connectors/record/{recordId}/content` to read the record.
44
+ *
45
+ * **Multiple matches:** one identifier can legitimately match more than
46
+ * one record — the same external ID may exist in several connected
47
+ * instances. In that case the response sets `ambiguous: true` and
48
+ * `matches` holds every candidate. Present the choice rather than taking
49
+ * the first; `connectorName` narrows a retry.
50
+ *
51
+ * **Misses are not errors.**
52
+ *
53
+ * Only records the caller can see are returned, and a miss is a `200`
54
+ * with an empty `matches` array and the input echoed in
55
+ * `not_found_identifiers` — not a `404`. The identifier resolved to
56
+ * nothing *or* to something the caller may not access; the two are
57
+ * deliberately indistinguishable, because an identifier is
58
+ * caller-supplied and guessable, and confirming existence would leak
59
+ * records across organizations. `searched_connectors` names what was
60
+ * covered, so a retry with `connectorName` is often the right next move.
61
+ *
62
+ * **Scope:** resolution searches every connector the caller can access,
63
+ * regardless of any source filter used elsewhere.
64
+ *
65
+ * If set, this operation will use either {@link Security.bearerAuth} or {@link Security.oauth2} from the global security.
66
+ */
67
+ export declare function connectorLookupRecordByIdentifier(client$: PipeshubCore, request: LookupRecordByIdentifierRequest, options?: RequestOptions): APIPromise<Result<Response, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
68
+ //# sourceMappingURL=connectorLookupRecordByIdentifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorLookupRecordByIdentifier.d.ts","sourceRoot":"","sources":["../../src/funcs/connectorLookupRecordByIdentifier.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,+BAA+B,EAEhC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,QAAQ,EACN,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
@@ -0,0 +1,138 @@
1
+ /*
2
+ * Adapted from Speakeasy-generated connectorLookupRecordByIdentifier.
3
+ */
4
+ import { encodeFormQuery } from "../lib/encodings.js";
5
+ import { compactMap } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
+ import { pathToFunc } from "../lib/url.js";
9
+ import { LookupRecordByIdentifierRequest$zodSchema, } from "../models/lookuprecordbyidentifierop.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ /**
12
+ * Resolve a URL, issue key or external ID to a Record ID
13
+ *
14
+ * @remarks
15
+ * Turn an external reference into the matching PipesHub record. Accepts a
16
+ * pasted link, a Jira-style issue key, or a bare external system ID from
17
+ * any connected source. Repeat `identifiers` to batch-resolve up to ten
18
+ * in one call.
19
+ *
20
+ * The response carries a rendered `text` view — each match's metadata
21
+ * block followed by a `Next:` line naming a follow-up call. The structured
22
+ * fields carry the same information for programmatic use.
23
+ *
24
+ * **Accepted identifiers**
25
+ * - Jira issue URL — `https://acme.atlassian.net/browse/PA-1787`
26
+ * - Jira issue key — `PA-1787`
27
+ * - Confluence page URL —
28
+ * `https://acme.atlassian.net/wiki/spaces/SD/pages/450625553/Agent+Loop`
29
+ * - Google Drive / Docs URL — `https://docs.google.com/document/d/1AbC.../edit`
30
+ * - Slack message link — `https://acme.slack.com/archives/C0123/p1720000000000100`
31
+ * - Bare external system ID — `450625553`
32
+ *
33
+ * **When to use this vs. the other record endpoints:**
34
+ * - **This endpoint** converts an *external* reference into an internal
35
+ * Record ID. Reach for it whenever you meet a link or ticket key and
36
+ * need the record behind it.
37
+ * - `GET /connectors/record/{recordId}/content` reads a record you have
38
+ * already identified. It needs an internal Record ID, which is exactly
39
+ * what this endpoint returns.
40
+ * - `GET /connectors/navigate` browses the hierarchy when you have a
41
+ * position in the tree rather than a specific identifier.
42
+ *
43
+ * **Typical flow:** call this with the reference, take a match's `id`
44
+ * from the response, then call
45
+ * `GET /connectors/record/{recordId}/content` to read the record.
46
+ *
47
+ * **Multiple matches:** one identifier can legitimately match more than
48
+ * one record — the same external ID may exist in several connected
49
+ * instances. In that case the response sets `ambiguous: true` and
50
+ * `matches` holds every candidate. Present the choice rather than taking
51
+ * the first; `connectorName` narrows a retry.
52
+ *
53
+ * **Misses are not errors.**
54
+ *
55
+ * Only records the caller can see are returned, and a miss is a `200`
56
+ * with an empty `matches` array and the input echoed in
57
+ * `not_found_identifiers` — not a `404`. The identifier resolved to
58
+ * nothing *or* to something the caller may not access; the two are
59
+ * deliberately indistinguishable, because an identifier is
60
+ * caller-supplied and guessable, and confirming existence would leak
61
+ * records across organizations. `searched_connectors` names what was
62
+ * covered, so a retry with `connectorName` is often the right next move.
63
+ *
64
+ * **Scope:** resolution searches every connector the caller can access,
65
+ * regardless of any source filter used elsewhere.
66
+ *
67
+ * If set, this operation will use either {@link Security.bearerAuth} or {@link Security.oauth2} from the global security.
68
+ */
69
+ export function connectorLookupRecordByIdentifier(client$, request, options) {
70
+ return new APIPromise($do(client$, request, options));
71
+ }
72
+ async function $do(client$, request, options) {
73
+ const parsed$ = safeParse(request, (value$) => LookupRecordByIdentifierRequest$zodSchema.parse(value$), "Input validation failed");
74
+ if (!parsed$.ok) {
75
+ return [parsed$, { status: "invalid" }];
76
+ }
77
+ const payload$ = parsed$.value;
78
+ const body$ = null;
79
+ const path$ = pathToFunc("/connectors/record/lookup")();
80
+ const query$ = encodeFormQuery({
81
+ "connectorName": payload$.connectorName,
82
+ "identifiers": payload$.identifiers,
83
+ });
84
+ const headers$ = new Headers(compactMap({
85
+ Accept: "application/json",
86
+ }));
87
+ const securityInput = await extractSecurity(client$._options.security);
88
+ const requestSecurity = resolveGlobalSecurity(securityInput);
89
+ const context = {
90
+ options: client$._options,
91
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
92
+ operationID: "lookupRecordByIdentifier",
93
+ oAuth2Scopes: ["kb:read", "connector:read"],
94
+ resolvedSecurity: requestSecurity,
95
+ securitySource: client$._options.security,
96
+ retryConfig: options?.retries
97
+ || client$._options.retryConfig
98
+ || { strategy: "none" },
99
+ retryCodes: options?.retryCodes || [
100
+ "429",
101
+ "500",
102
+ "502",
103
+ "503",
104
+ "504",
105
+ ],
106
+ };
107
+ const requestRes = client$._createRequest(context, {
108
+ security: requestSecurity,
109
+ method: "GET",
110
+ baseURL: options?.serverURL,
111
+ path: path$,
112
+ headers: headers$,
113
+ query: query$,
114
+ body: body$,
115
+ userAgent: client$._options.userAgent,
116
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
117
+ || -1,
118
+ }, options);
119
+ if (!requestRes.ok) {
120
+ return [requestRes, { status: "invalid" }];
121
+ }
122
+ const req$ = requestRes.value;
123
+ const doResult = await client$._do(req$, {
124
+ context,
125
+ errorCodes: [],
126
+ retryConfig: context.retryConfig,
127
+ retryCodes: context.retryCodes,
128
+ });
129
+ if (!doResult.ok) {
130
+ return [doResult, { status: "request-error", request: req$ }];
131
+ }
132
+ return [doResult, {
133
+ status: "complete",
134
+ "request": req$,
135
+ response: doResult.value,
136
+ }];
137
+ }
138
+ //# sourceMappingURL=connectorLookupRecordByIdentifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorLookupRecordByIdentifier.js","sourceRoot":"","sources":["../../src/funcs/connectorLookupRecordByIdentifier.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,e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AAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { PipeshubCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { APIError } from "../models/errors/apierror.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
+ import { NavigateKnowledgeGraphRequest } from "../models/navigateknowledgegraphop.js";
7
+ import { APIPromise } from "../types/async.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Browse the knowledge graph from a node
11
+ *
12
+ * @remarks
13
+ * Open a node in the knowledge graph and see what is inside it — a file
14
+ * explorer across every connected source.
15
+ *
16
+ * Call it with no `nodeId` for a flat listing of every record group and
17
+ * record the caller can reach, newest first. This is a starting point to
18
+ * pick a node from, not a roster of connected apps — app nodes are never
19
+ * returned in a listing, though an app's `id` is accepted as a `nodeId`
20
+ * and lists that app's record groups. Pass a node's `id` to descend:
21
+ * record groups contain records and folders, and a record contains its
22
+ * own children — comments, attachments, sub-tasks — plus a `related`
23
+ * section of cross-referenced records, such as the Confluence page linked
24
+ * from a Jira ticket. `nodeId` is tolerant: a URL or an issue key such as
25
+ * `PA-1787` is resolved to its record before navigating, so a link can be
26
+ * pasted straight in without a separate lookup call.
27
+ *
28
+ * The response carries a rendered `text` view — breadcrumbs, the current
29
+ * node, the children listing, `Related:`, and a closing `Next:` line
30
+ * naming a follow-up call. The structured fields carry the same
31
+ * information for programmatic use.
32
+ *
33
+ * **When to use this vs. the other record endpoints:**
34
+ * - **This endpoint** is for structural exploration — "what is in this
35
+ * project", "what is attached to this ticket", "what else links to this
36
+ * page". It returns names, types and IDs; it never returns document
37
+ * text.
38
+ * - `GET /connectors/record/{recordId}/content` returns one record's
39
+ * actual parsed text. Use it once navigation has identified the record
40
+ * you want to read.
41
+ * - `GET /connectors/record/lookup` is the way in when you hold a URL or
42
+ * an issue key rather than a position in the tree.
43
+ *
44
+ * **Typical flow:** call with no `nodeId` to see what is reachable → pass
45
+ * a record group's `id` to list its records → take a row whose
46
+ * `is_record` is true and call
47
+ * `GET /connectors/record/{recordId}/content` to read it.
48
+ *
49
+ * **Paging and depth:** results are paginated; `pagination.has_next`
50
+ * tells you whether to request the next `page`. `depth` above 1 returns
51
+ * all descendants down to that level as one flat list, each row carrying
52
+ * its own `level`, instead of only direct children.
53
+ *
54
+ * **Scope:** everything the caller can read, across both connectors and
55
+ * Knowledge Base collections. No connector-level filter is applied — the
56
+ * listing is bounded by per-node permissions alone.
57
+ *
58
+ * **Permission scoping:**
59
+ *
60
+ * `rows` and `related` carry only nodes the caller can see, and the
61
+ * opened node itself is access-checked before any of its details are
62
+ * returned. A node that does not exist and a node the caller cannot
63
+ * access are deliberately indistinguishable — both return an empty view
64
+ * rather than an error.
65
+ *
66
+ * `breadcrumbs` is the exception: the ancestor trail is resolved by id
67
+ * alone, without a permission check. For a record shared directly with
68
+ * the caller, it can therefore name ancestors the caller cannot open.
69
+ * Treat breadcrumb entries as labels, not as nodes guaranteed to be
70
+ * navigable.
71
+ *
72
+ * If set, this operation will use either {@link Security.bearerAuth} or {@link Security.oauth2} from the global security.
73
+ */
74
+ export declare function connectorNavigateKnowledgeGraph(client$: PipeshubCore, request?: NavigateKnowledgeGraphRequest | undefined, options?: RequestOptions): APIPromise<Result<Response, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
75
+ //# sourceMappingURL=connectorNavigateKnowledgeGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorNavigateKnowledgeGraph.d.ts","sourceRoot":"","sources":["../../src/funcs/connectorNavigateKnowledgeGraph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,6BAA6B,EAE9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,QAAQ,EACN,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
@@ -0,0 +1,152 @@
1
+ /*
2
+ * Adapted from Speakeasy-generated connectorNavigateKnowledgeGraph.
3
+ */
4
+ import { encodeFormQuery } from "../lib/encodings.js";
5
+ import { compactMap } from "../lib/primitives.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
8
+ import { pathToFunc } from "../lib/url.js";
9
+ import { NavigateKnowledgeGraphRequest$zodSchema, } from "../models/navigateknowledgegraphop.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ /**
12
+ * Browse the knowledge graph from a node
13
+ *
14
+ * @remarks
15
+ * Open a node in the knowledge graph and see what is inside it — a file
16
+ * explorer across every connected source.
17
+ *
18
+ * Call it with no `nodeId` for a flat listing of every record group and
19
+ * record the caller can reach, newest first. This is a starting point to
20
+ * pick a node from, not a roster of connected apps — app nodes are never
21
+ * returned in a listing, though an app's `id` is accepted as a `nodeId`
22
+ * and lists that app's record groups. Pass a node's `id` to descend:
23
+ * record groups contain records and folders, and a record contains its
24
+ * own children — comments, attachments, sub-tasks — plus a `related`
25
+ * section of cross-referenced records, such as the Confluence page linked
26
+ * from a Jira ticket. `nodeId` is tolerant: a URL or an issue key such as
27
+ * `PA-1787` is resolved to its record before navigating, so a link can be
28
+ * pasted straight in without a separate lookup call.
29
+ *
30
+ * The response carries a rendered `text` view — breadcrumbs, the current
31
+ * node, the children listing, `Related:`, and a closing `Next:` line
32
+ * naming a follow-up call. The structured fields carry the same
33
+ * information for programmatic use.
34
+ *
35
+ * **When to use this vs. the other record endpoints:**
36
+ * - **This endpoint** is for structural exploration — "what is in this
37
+ * project", "what is attached to this ticket", "what else links to this
38
+ * page". It returns names, types and IDs; it never returns document
39
+ * text.
40
+ * - `GET /connectors/record/{recordId}/content` returns one record's
41
+ * actual parsed text. Use it once navigation has identified the record
42
+ * you want to read.
43
+ * - `GET /connectors/record/lookup` is the way in when you hold a URL or
44
+ * an issue key rather than a position in the tree.
45
+ *
46
+ * **Typical flow:** call with no `nodeId` to see what is reachable → pass
47
+ * a record group's `id` to list its records → take a row whose
48
+ * `is_record` is true and call
49
+ * `GET /connectors/record/{recordId}/content` to read it.
50
+ *
51
+ * **Paging and depth:** results are paginated; `pagination.has_next`
52
+ * tells you whether to request the next `page`. `depth` above 1 returns
53
+ * all descendants down to that level as one flat list, each row carrying
54
+ * its own `level`, instead of only direct children.
55
+ *
56
+ * **Scope:** everything the caller can read, across both connectors and
57
+ * Knowledge Base collections. No connector-level filter is applied — the
58
+ * listing is bounded by per-node permissions alone.
59
+ *
60
+ * **Permission scoping:**
61
+ *
62
+ * `rows` and `related` carry only nodes the caller can see, and the
63
+ * opened node itself is access-checked before any of its details are
64
+ * returned. A node that does not exist and a node the caller cannot
65
+ * access are deliberately indistinguishable — both return an empty view
66
+ * rather than an error.
67
+ *
68
+ * `breadcrumbs` is the exception: the ancestor trail is resolved by id
69
+ * alone, without a permission check. For a record shared directly with
70
+ * the caller, it can therefore name ancestors the caller cannot open.
71
+ * Treat breadcrumb entries as labels, not as nodes guaranteed to be
72
+ * navigable.
73
+ *
74
+ * If set, this operation will use either {@link Security.bearerAuth} or {@link Security.oauth2} from the global security.
75
+ */
76
+ export function connectorNavigateKnowledgeGraph(client$, request, options) {
77
+ return new APIPromise($do(client$, request, options));
78
+ }
79
+ async function $do(client$, request, options) {
80
+ const parsed$ = safeParse(request, (value$) => NavigateKnowledgeGraphRequest$zodSchema.optional().parse(value$), "Input validation failed");
81
+ if (!parsed$.ok) {
82
+ return [parsed$, { status: "invalid" }];
83
+ }
84
+ const payload$ = parsed$.value;
85
+ const body$ = null;
86
+ const path$ = pathToFunc("/connectors/navigate")();
87
+ const query$ = encodeFormQuery({
88
+ "createdAfter": payload$?.createdAfter,
89
+ "createdBefore": payload$?.createdBefore,
90
+ "depth": payload$?.depth,
91
+ "limit": payload$?.limit,
92
+ "modifiedAfter": payload$?.modifiedAfter,
93
+ "modifiedBefore": payload$?.modifiedBefore,
94
+ "nodeId": payload$?.nodeId,
95
+ "nodeTypes": payload$?.nodeTypes,
96
+ "page": payload$?.page,
97
+ });
98
+ const headers$ = new Headers(compactMap({
99
+ Accept: "application/json",
100
+ }));
101
+ const securityInput = await extractSecurity(client$._options.security);
102
+ const requestSecurity = resolveGlobalSecurity(securityInput);
103
+ const context = {
104
+ options: client$._options,
105
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
106
+ operationID: "navigateKnowledgeGraph",
107
+ oAuth2Scopes: ["kb:read", "connector:read"],
108
+ resolvedSecurity: requestSecurity,
109
+ securitySource: client$._options.security,
110
+ retryConfig: options?.retries
111
+ || client$._options.retryConfig
112
+ || { strategy: "none" },
113
+ retryCodes: options?.retryCodes || [
114
+ "429",
115
+ "500",
116
+ "502",
117
+ "503",
118
+ "504",
119
+ ],
120
+ };
121
+ const requestRes = client$._createRequest(context, {
122
+ security: requestSecurity,
123
+ method: "GET",
124
+ baseURL: options?.serverURL,
125
+ path: path$,
126
+ headers: headers$,
127
+ query: query$,
128
+ body: body$,
129
+ userAgent: client$._options.userAgent,
130
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
131
+ || -1,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req$ = requestRes.value;
137
+ const doResult = await client$._do(req$, {
138
+ context,
139
+ errorCodes: [],
140
+ retryConfig: context.retryConfig,
141
+ retryCodes: context.retryCodes,
142
+ });
143
+ if (!doResult.ok) {
144
+ return [doResult, { status: "request-error", request: req$ }];
145
+ }
146
+ return [doResult, {
147
+ status: "complete",
148
+ "request": req$,
149
+ response: doResult.value,
150
+ }];
151
+ }
152
+ //# sourceMappingURL=connectorNavigateKnowledgeGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorNavigateKnowledgeGraph.js","sourceRoot":"","sources":["../../src/funcs/connectorNavigateKnowledgeGraph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,O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AO,CAAC,CAAC;IACZ,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;IAE9B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,OAAO;QACP,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -30,7 +30,7 @@ async function $do(client$, request, options) {
30
30
  options: client$._options,
31
31
  baseURL: options?.serverURL ?? client$._baseURL ?? "",
32
32
  operationID: "streamConversation",
33
- oAuth2Scopes: ["conversation:write"],
33
+ oAuth2Scopes: ["conversation:chat"],
34
34
  resolvedSecurity: requestSecurity,
35
35
  securitySource: client$._options.security,
36
36
  retryConfig: options?.retries
@@ -1 +1 @@
1
- {"version":3,"file":"conversationsStreamConversation.js","sourceRoot":"","sources":["../../src/funcs/conversationsStreamConversation.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,uEAAuE;AACvE,0EAA0E;AAC1E,0CAA0C;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,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;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"conversationsStreamConversation.js","sourceRoot":"","sources":["../../src/funcs/conversationsStreamConversation.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,uEAAuE;AACvE,0EAA0E;AAC1E,0CAA0C;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,mCAAmC,GACpC,MAAM,wCAAwC,CAAC;AAUhD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,UAAU,+BAA+B,CAC7C,OAAqB,EACrB,OAAkC,EAClC,OAAwB;IAaxB,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,OAAqB,EACrB,OAAkC,EAClC,OAAwB;IAgBxB,MAAM,OAAO,GAAG,SAAS,CACvB,OAAO,EACP,CAAC,MAAM,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,MAAM,CAAC,EAC7D,yBAAyB,CAC1B,CAAC;IACF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M;QACd,OAAO,EAAE,OAAO,EAAE,SAAS;QAC3B,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,SAAS;QACrC,mEAAmE;QACnE,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,CAAC,CAAC;KACpC,EAAE,OAAO,CAAC,CAAC;IACZ,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACnB,OAAO,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;IAE9B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,OAAO;QACP,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -53,7 +53,7 @@ async function $do(client$, request, options) {
53
53
  options: client$._options,
54
54
  baseURL: options?.serverURL ?? client$._baseURL ?? "",
55
55
  operationID: "getAllUserGroups",
56
- oAuth2Scopes: [],
56
+ oAuth2Scopes: ["usergroup:read"],
57
57
  resolvedSecurity: requestSecurity,
58
58
  securitySource: client$._options.security,
59
59
  retryConfig: options?.retries
@@ -1 +1 @@
1
- {"version":3,"file":"userGroupsGetAllUserGroups.js","sourceRoot":"","s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AAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE;YAChB,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ,CAAC,KAAK;SACzB,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../src/hooks/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,QAIrC"}
1
+ {"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../src/hooks/registration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAQnC,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,QAKrC"}
@@ -1,12 +1,13 @@
1
+ import { RequestIDHook } from "./requestid.js";
1
2
  /*
2
3
  * This file is only ever generated once on the first generation and then is free to be modified.
3
4
  * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
4
5
  * in this file or in separate files in the hooks folder.
5
6
  */
6
- // @ts-expect-error remove this line when you add your first hook and hooks is used
7
7
  export function initHooks(hooks) {
8
8
  // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
9
9
  // with an instance of a hook that implements that specific Hook interface
10
10
  // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
11
+ hooks.registerBeforeRequestHook(new RequestIDHook());
11
12
  }
12
13
  //# sourceMappingURL=registration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/hooks/registration.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,mFAAmF;AACnF,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,gHAAgH;IAChH,0EAA0E;IAC1E,4FAA4F;AAC9F,CAAC"}
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../src/hooks/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;GAIG;AAEH,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,gHAAgH;IAChH,0EAA0E;IAC1E,4FAA4F;IAC5F,KAAK,CAAC,yBAAyB,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface RequestContextStore {
2
+ random: string;
3
+ finalId?: string;
4
+ }
5
+ /** Bind a fresh request-id context for the remainder of the current async chain. */
6
+ export declare function bindNewRequestId(): void;
7
+ export declare function getRequestContextStore(): RequestContextStore | undefined;
8
+ /** One-off id for the rare case a backend call happens with no bound tool-call context. */
9
+ export declare function newRequestId(): string;
10
+ //# sourceMappingURL=request-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../src/hooks/request-context.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,oFAAoF;AACpF,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED,wBAAgB,sBAAsB,IAAI,mBAAmB,GAAG,SAAS,CAExE;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Ambient per-tool-call request-id context (AsyncLocalStorage). Mirrors the
3
+ * pipeshub-ai backend's own request-context pattern (same header name,
4
+ * `x-request-id`) so a single id traces one MCP tool/resource/prompt
5
+ * invocation across every backend HTTP call it makes.
6
+ *
7
+ * `tools.ts` / `resources.ts` / `prompts.ts` are Speakeasy-generated and
8
+ * regenerated on every build, so there is no `next()`-style wrapper point to
9
+ * bind context around a call. Instead `bindNewRequestId` is called from the
10
+ * hand-written `getClient` closure in `server.ts`, which every generated
11
+ * dispatch site calls synchronously as the first thing before invoking a
12
+ * tool/resource/prompt handler — `enterWith` binds the store for the rest of
13
+ * that handler's execution (sync remainder + everything it awaits).
14
+ *
15
+ * The final id (`mcp-<userId>-<random>` or `mcp-<random>`) can't be composed
16
+ * at bind time — `getClient` only has a `PipeshubCore`, not yet a resolved
17
+ * `Authorization` header, and resolving security may be async (OAuth2)
18
+ * while `getClient` must stay sync (generated call sites pass its return
19
+ * value straight into a handler, never await it). So only the random suffix
20
+ * is fixed here; `requestid.ts`'s hook fills in `finalId` off the first
21
+ * outbound request's `Authorization` header and every later call in the
22
+ * same tool invocation reuses that cached value.
23
+ */
24
+ import { AsyncLocalStorage } from "node:async_hooks";
25
+ import { nanoid } from "nanoid";
26
+ const storage = new AsyncLocalStorage();
27
+ /** Bind a fresh request-id context for the remainder of the current async chain. */
28
+ export function bindNewRequestId() {
29
+ storage.enterWith({ random: nanoid() });
30
+ }
31
+ export function getRequestContextStore() {
32
+ return storage.getStore();
33
+ }
34
+ /** One-off id for the rare case a backend call happens with no bound tool-call context. */
35
+ export function newRequestId() {
36
+ return `mcp-${nanoid()}`;
37
+ }
38
+ //# sourceMappingURL=request-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-context.js","sourceRoot":"","sources":["../../src/hooks/request-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOhC,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAuB,CAAC;AAE7D,oFAAoF;AACpF,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;AAC5B,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,YAAY;IAC1B,OAAO,OAAO,MAAM,EAAE,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BeforeRequestContext, BeforeRequestHook } from "./types.js";
2
+ export declare class RequestIDHook implements BeforeRequestHook {
3
+ beforeRequest(_hookCtx: BeforeRequestContext, request: Request): Request;
4
+ }
5
+ //# sourceMappingURL=requestid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestid.d.ts","sourceRoot":"","sources":["../../src/hooks/requestid.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA0BrE,qBAAa,aAAc,YAAW,iBAAiB;IACrD,aAAa,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;CAqBzE"}