@pipeshub-ai/mcp 2.2.0 → 2.3.1

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 (112) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +703 -189
  3. package/bin/mcp-server.js.map +19 -13
  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 +235 -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/connectorLookupRecordByIdentifier.d.ts +68 -0
  27. package/esm/funcs/connectorLookupRecordByIdentifier.d.ts.map +1 -0
  28. package/esm/funcs/connectorLookupRecordByIdentifier.js +138 -0
  29. package/esm/funcs/connectorLookupRecordByIdentifier.js.map +1 -0
  30. package/esm/funcs/connectorNavigateKnowledgeGraph.d.ts +75 -0
  31. package/esm/funcs/connectorNavigateKnowledgeGraph.d.ts.map +1 -0
  32. package/esm/funcs/connectorNavigateKnowledgeGraph.js +152 -0
  33. package/esm/funcs/connectorNavigateKnowledgeGraph.js.map +1 -0
  34. package/esm/lib/base64.d.ts +1 -1
  35. package/esm/lib/base64.d.ts.map +1 -1
  36. package/esm/lib/base64.js +6 -3
  37. package/esm/lib/base64.js.map +1 -1
  38. package/esm/lib/bytes-to-base64.d.ts +16 -0
  39. package/esm/lib/bytes-to-base64.d.ts.map +1 -0
  40. package/esm/lib/bytes-to-base64.js +23 -0
  41. package/esm/lib/bytes-to-base64.js.map +1 -0
  42. package/esm/mcp-server/instructions.d.ts +1 -1
  43. package/esm/mcp-server/instructions.d.ts.map +1 -1
  44. package/esm/mcp-server/instructions.js +30 -0
  45. package/esm/mcp-server/instructions.js.map +1 -1
  46. package/esm/mcp-server/shared.d.ts +2 -2
  47. package/esm/mcp-server/shared.d.ts.map +1 -1
  48. package/esm/mcp-server/shared.js +7 -3
  49. package/esm/mcp-server/shared.js.map +1 -1
  50. package/esm/mcp-server/tools/_agui.d.ts +34 -0
  51. package/esm/mcp-server/tools/_agui.d.ts.map +1 -0
  52. package/esm/mcp-server/tools/_agui.js +91 -0
  53. package/esm/mcp-server/tools/_agui.js.map +1 -0
  54. package/esm/mcp-server/tools/_helpers.d.ts +20 -3
  55. package/esm/mcp-server/tools/_helpers.d.ts.map +1 -1
  56. package/esm/mcp-server/tools/_helpers.js +54 -10
  57. package/esm/mcp-server/tools/_helpers.js.map +1 -1
  58. package/esm/mcp-server/tools/pipeshubChat.d.ts +0 -3
  59. package/esm/mcp-server/tools/pipeshubChat.d.ts.map +1 -1
  60. package/esm/mcp-server/tools/pipeshubChat.js +75 -98
  61. package/esm/mcp-server/tools/pipeshubChat.js.map +1 -1
  62. package/esm/mcp-server/tools/pipeshubDirectory.d.ts.map +1 -1
  63. package/esm/mcp-server/tools/pipeshubDirectory.js +62 -8
  64. package/esm/mcp-server/tools/pipeshubDirectory.js.map +1 -1
  65. package/esm/mcp-server/tools/pipeshubGetRecordContent.d.ts +118 -1
  66. package/esm/mcp-server/tools/pipeshubGetRecordContent.d.ts.map +1 -1
  67. package/esm/mcp-server/tools/pipeshubGetRecordContent.js +180 -29
  68. package/esm/mcp-server/tools/pipeshubGetRecordContent.js.map +1 -1
  69. package/esm/mcp-server/tools/pipeshubSearch.d.ts.map +1 -1
  70. package/esm/mcp-server/tools/pipeshubSearch.js +15 -2
  71. package/esm/mcp-server/tools/pipeshubSearch.js.map +1 -1
  72. package/esm/mcp-server/tools/pipeshubSources.js +2 -2
  73. package/esm/mcp-server/tools/pipeshubSources.js.map +1 -1
  74. package/esm/models/lookuprecordbyidentifierop.d.ts +7 -0
  75. package/esm/models/lookuprecordbyidentifierop.d.ts.map +1 -0
  76. package/esm/models/lookuprecordbyidentifierop.js +14 -0
  77. package/esm/models/lookuprecordbyidentifierop.js.map +1 -0
  78. package/esm/models/navigateknowledgegraphop.d.ts +14 -0
  79. package/esm/models/navigateknowledgegraphop.d.ts.map +1 -0
  80. package/esm/models/navigateknowledgegraphop.js +25 -0
  81. package/esm/models/navigateknowledgegraphop.js.map +1 -0
  82. package/esm/tool-names.js +4 -4
  83. package/esm/tool-names.js.map +1 -1
  84. package/package.json +3 -2
  85. package/qm/README.md +247 -0
  86. package/qm/SECURITY.md +134 -0
  87. package/qm/TROUBLESHOOTING.md +218 -0
  88. package/qm/qm.config.fragment.jsonc +42 -0
  89. package/qm/sandbox/Dockerfile +22 -0
  90. package/qm/sandbox/skills/pipeshub/SKILL.md +69 -0
  91. package/qm/sandbox/tools/pipeshub/tool.json +36 -0
  92. package/src/cli/client.ts +279 -0
  93. package/src/cli/commands.ts +403 -0
  94. package/src/cli/config.ts +229 -0
  95. package/src/cli/init-qm.ts +215 -0
  96. package/src/cli/pipeshub.ts +333 -0
  97. package/src/funcs/connectorLookupRecordByIdentifier.ts +200 -0
  98. package/src/funcs/connectorNavigateKnowledgeGraph.ts +215 -0
  99. package/src/lib/base64.ts +6 -3
  100. package/src/lib/bytes-to-base64.ts +24 -0
  101. package/src/mcp-server/instructions.ts +30 -0
  102. package/src/mcp-server/shared.ts +7 -3
  103. package/src/mcp-server/tools/_agui.ts +138 -0
  104. package/src/mcp-server/tools/_helpers.ts +55 -8
  105. package/src/mcp-server/tools/pipeshubChat.ts +78 -97
  106. package/src/mcp-server/tools/pipeshubDirectory.ts +65 -7
  107. package/src/mcp-server/tools/pipeshubGetRecordContent.ts +213 -29
  108. package/src/mcp-server/tools/pipeshubSearch.ts +15 -2
  109. package/src/mcp-server/tools/pipeshubSources.ts +2 -2
  110. package/src/models/lookuprecordbyidentifierop.ts +26 -0
  111. package/src/models/navigateknowledgegraphop.ts +56 -0
  112. package/src/tool-names.ts +4 -4
@@ -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,U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AC7C,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,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,qBA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AAE,MAAM;QACb,IAAI,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"}
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- export declare function bytesToBase64(u8arr: Uint8Array): string;
2
+ export { bytesToBase64 } from "./bytes-to-base64.js";
3
3
  export declare function bytesFromBase64(encoded: string): Uint8Array;
4
4
  export declare function stringToBytes(str: string): Uint8Array;
5
5
  export declare function stringFromBytes(u8arr: Uint8Array): string;
@@ -1 +1 @@
1
- {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/lib/base64.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEvD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAE3D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAErD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,eAAO,MAAM,WAAW,kKAEkB,CAAC;AAE3C,eAAO,MAAM,UAAU,kKAEqB,CAAC"}
1
+ {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/lib/base64.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAE3D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAErD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,eAAO,MAAM,WAAW,kKAEkB,CAAC;AAE3C,eAAO,MAAM,UAAU,kKAEqB,CAAC"}
package/esm/lib/base64.js CHANGED
@@ -1,10 +1,13 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ *
4
+ * Exception: `bytesToBase64` is re-exported from the hand-maintained
5
+ * `./bytes-to-base64.js` (see that file and `.genignore`). Do not restore
6
+ * the generated one-liner — it overflows the stack on binary payloads.
3
7
  */
4
8
  import * as z from "zod";
5
- export function bytesToBase64(u8arr) {
6
- return btoa(String.fromCodePoint(...u8arr));
7
- }
9
+ export { bytesToBase64 } from "./bytes-to-base64.js";
10
+ import { bytesToBase64 } from "./bytes-to-base64.js";
8
11
  export function bytesFromBase64(encoded) {
9
12
  return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0));
10
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/lib/base64.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,OAAO,eAAe,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,CAAa,CAAC,CAAC,EAAE,EAAE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ACzB,MAAM,CAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,UAAU,CAAC;KAClD,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,UAAU,CAAC;KAClD,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Hand-maintained base64 encoder for binary payloads.
3
+ *
4
+ * Speakeasy's generated helper is:
5
+ * btoa(String.fromCodePoint(...u8arr))
6
+ * which passes one argument per byte and throws "Maximum call stack size
7
+ * exceeded" once the array is larger than the engine's argument limit
8
+ * (between 64 KB and 128 KB on Node 24). That is smaller than a typical
9
+ * PDF or image, so binary MCP results fail outright.
10
+ *
11
+ * Keep this file out of Speakeasy regeneration (see `.genignore`). The
12
+ * generated wrappers in `src/lib/base64.ts` and `src/mcp-server/shared.ts`
13
+ * re-export / call through here.
14
+ */
15
+ export declare function bytesToBase64(u8arr: Uint8Array): string;
16
+ //# sourceMappingURL=bytes-to-base64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes-to-base64.d.ts","sourceRoot":"","sources":["../../src/lib/bytes-to-base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMvD"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Hand-maintained base64 encoder for binary payloads.
3
+ *
4
+ * Speakeasy's generated helper is:
5
+ * btoa(String.fromCodePoint(...u8arr))
6
+ * which passes one argument per byte and throws "Maximum call stack size
7
+ * exceeded" once the array is larger than the engine's argument limit
8
+ * (between 64 KB and 128 KB on Node 24). That is smaller than a typical
9
+ * PDF or image, so binary MCP results fail outright.
10
+ *
11
+ * Keep this file out of Speakeasy regeneration (see `.genignore`). The
12
+ * generated wrappers in `src/lib/base64.ts` and `src/mcp-server/shared.ts`
13
+ * re-export / call through here.
14
+ */
15
+ const BASE64_CHUNK = 0x8000;
16
+ export function bytesToBase64(u8arr) {
17
+ let binary = "";
18
+ for (let i = 0; i < u8arr.length; i += BASE64_CHUNK) {
19
+ binary += String.fromCharCode(...u8arr.subarray(i, i + BASE64_CHUNK));
20
+ }
21
+ return btoa(binary);
22
+ }
23
+ //# sourceMappingURL=bytes-to-base64.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes-to-base64.js","sourceRoot":"","sources":["../../src/lib/bytes-to-base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC;QACpD,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const PIPESHUB_INSTRUCTIONS = "# PipesHub MCP \u2014 instructions for the LLM\n\nPipesHub is the user's workplace AI platform. It indexes their documents,\nknowledge base content, and connector sources (Drive, Box, Confluence,\nSlack, Jira, Gmail, ...). When in doubt, the answer is in PipesHub.\n\n## Full-document tasks: `pipeshub_search` \u2192 `pipeshub_get_record_content`\n\n`pipeshub_chat` answers from a handful of retrieved passages \u2014 it never\nreads a whole document. Whenever the task depends on a document's\nCOMPLETE content, fetch the document itself:\n\n1. `pipeshub_search` with the document's name / topic.\n2. Take the top hit's `recordId`.\n3. `pipeshub_get_record_content`, and answer from the returned content.\n\nTasks that need this path \u2014 anything where missing part of the document\ncould make the answer wrong:\n\n- Summarize / TL;DR / key points / takeaways / action items of a doc.\n- Extract or list ALL of something (dates, owners, requirements, ...).\n- Check whether / where a doc mentions something.\n- Translate, rewrite, outline, review, or reformat a doc.\n- Compare named docs (fetch each `recordId`).\n- Any question explicitly scoped to ONE named document \u2014 chat retrieval\n cannot be restricted to a single record.\n\n## Default tool: `pipeshub_chat`\n\n**Use `pipeshub_chat` for any question that could plausibly be answered\nby the user's PipesHub-indexed data** and is not a full-document task:\n\n- A question that may span several documents, or where you don't yet\n know which record holds the answer (e.g. \"what did Aashil say about\n onboarding?\").\n- Anything about company / org policies, processes, decisions, or\n history (e.g. \"what's our vacation policy?\", \"who owns the auth\n service?\").\n- Anything explicitly mentioning PipesHub itself, or its sources\n (Drive / Box / Confluence / Slack / Gmail / Jira / etc.) when the\n user has those connected.\n- Open-ended \"what do we know about X\" questions where the answer\n likely lives in the org's documents.\n\nDo NOT answer those from your own knowledge \u2014 `pipeshub_chat` grounds\nthe answer in the user's actual indexed content and returns citations\nthe user can verify.\n\n## When to use the other tools\n\n- `pipeshub_search` \u2014 locate a document by name or topic and resolve it\n to a `recordId`. To read or summarize one specific document, search,\n then pass the top hit's `recordId` to `pipeshub_get_record_content`.\n- `pipeshub_download_record` \u2014 when the user wants the actual file\n bytes (download, attach, open). Get the `recordId` either from\n citations on a prior `pipeshub_chat` response or from\n `pipeshub_search`.\n- `pipeshub_get_record_content` \u2014 when you need a record's full parsed\n content (returned as a single `content` string: metadata header plus\n the document's text) without downloading the original file. Prefer this\n over download when the question is about what the record says.\n- `pipeshub_directory` \u2014 people, groups, teams, and `whoami` lookups.\n Not for documents.\n- `pipeshub_sources` \u2014 call once at the start of a session to discover\n which connectors / KB / models are available, then cache the result.\n- `pipeshub_agents` \u2014 list the org's configured **agents** (specialized\n assistants with their own prompt, tools, and knowledge scope).\n\n## Agents\n\nSome orgs configure **agents** for specific jobs (e.g. a Slack messenger, a\nJira ticket creator, a Salesforce CRM updater). To run a turn against an\nagent, call `pipeshub_chat` with its `agentId` (from `pipeshub_agents`)\n\u2014 optionally with an agent `chatMode` (`auto` by default, or `quick` /\n`verification` / `deep`). Keep passing the same `agentId` plus the\nreturned `conversationId` on follow-up turns.\n\n**When to route to an agent vs plain chat:**\n- The user names a system/action that maps to an agent (e.g. \"post to\n Slack\", \"create a Jira ticket\", \"update the Salesforce deal\") \u2192 call\n `pipeshub_agents`, pick the matching agent, and use it.\n- Plain question about the org's knowledge or the public web \u2192 just use\n `pipeshub_chat` (no `agentId`) with `internal_search` or `web_search`.\n\n**If you are unsure which agent or route fits the request**, call\n`pipeshub_agents` FIRST and read the returned names/descriptions, then\neither pick the best match or present the list to the user and let them\nchoose. Do NOT guess an agent blindly, and do NOT refuse \u2014 list the agents\nand decide from real data. The list may be empty (no agents configured),\nin which case fall back to plain `pipeshub_chat`.\n\n## Conversation lifecycle\n\n`pipeshub_chat` is a single tool that handles both starting and\ncontinuing conversations (plain or with an `agentId`). On the first turn\nomit `conversationId`; on every subsequent turn pass back the\n`conversationId` returned by the previous call (along with the same\n`agentId` if you used one). Server-side context is preserved \u2014 do NOT\nreplay prior messages. Only start a fresh conversation when the user\nexplicitly asks to clear context.\n";
1
+ export declare const PIPESHUB_INSTRUCTIONS = "# PipesHub MCP \u2014 instructions for the LLM\n\nPipesHub is the user's workplace AI platform. It indexes their documents,\nknowledge base content, and connector sources (Drive, Box, Confluence,\nSlack, Jira, Gmail, ...). When in doubt, the answer is in PipesHub.\n\n## Full-document tasks: `pipeshub_search` \u2192 `pipeshub_get_record_content`\n\n`pipeshub_chat` answers from a handful of retrieved passages \u2014 it never\nreads a whole document. Whenever the task depends on a document's\nCOMPLETE content, fetch the document itself:\n\n1. `pipeshub_search` with the document's name / topic.\n2. Take the top hit's `recordId`.\n3. `pipeshub_get_record_content`, and answer from the returned content.\n\nTasks that need this path \u2014 anything where missing part of the document\ncould make the answer wrong:\n\n- Summarize / TL;DR / key points / takeaways / action items of a doc.\n- Extract or list ALL of something (dates, owners, requirements, ...).\n- Check whether / where a doc mentions something.\n- Translate, rewrite, outline, review, or reformat a doc.\n- Compare named docs (fetch each `recordId`).\n- Any question explicitly scoped to ONE named document \u2014 chat retrieval\n cannot be restricted to a single record.\n\n## Default tool: `pipeshub_chat`\n\n**Use `pipeshub_chat` for any question that could plausibly be answered\nby the user's PipesHub-indexed data** and is not a full-document task:\n\n- A question that may span several documents, or where you don't yet\n know which record holds the answer (e.g. \"what did Aashil say about\n onboarding?\").\n- Anything about company / org policies, processes, decisions, or\n history (e.g. \"what's our vacation policy?\", \"who owns the auth\n service?\").\n- Anything explicitly mentioning PipesHub itself, or its sources\n (Drive / Box / Confluence / Slack / Gmail / Jira / etc.) when the\n user has those connected.\n- Open-ended \"what do we know about X\" questions where the answer\n likely lives in the org's documents.\n\nDo NOT answer those from your own knowledge \u2014 `pipeshub_chat` grounds\nthe answer in the user's actual indexed content and returns citations\nthe user can verify.\n\n## When to use the other tools\n\n- `pipeshub_search` \u2014 locate a document by name or topic and resolve it\n to a `recordId`. To read or summarize one specific document, search,\n then pass the top hit's `recordId` to `pipeshub_get_record_content`.\n- `pipeshub_download_record` \u2014 when the user wants the actual file\n bytes (download, attach, open). Get the `recordId` either from\n citations on a prior `pipeshub_chat` response or from\n `pipeshub_search`.\n- `pipeshub_get_record_content` \u2014 when you need a record's full parsed\n content (returned as a single `content` string: metadata header plus\n the document's text) without downloading the original file. Prefer this\n over download when the question is about what the record says.\n- `pipeshub_directory` \u2014 people, groups, teams, and `whoami` lookups.\n Not for documents.\n- `pipeshub_sources` \u2014 call once at the start of a session to discover\n which connectors / KB / models are available, then cache the result.\n- `pipeshub_agents` \u2014 list the org's configured **agents** (specialized\n assistants with their own prompt, tools, and knowledge scope).\n\n## Knowledge Sources\n\nA source (an app connector or a KB) holds record groups (a project, space,\ndrive, folder), which hold records (one ticket, page, file). Records nest \u2014\nan epic over its stories, a page over its child pages.\n\n**Every tool returns metadata or content.**\n\n- `pipeshub_search` / `pipeshub_chat` \u2014 content, but only a ranked sample of\n blocks: never all blocks of a record, never every record that matches, never\n a complete list of what exists.\n- `mode:\"lookup\"` and `mode:\"navigate\"` \u2014 metadata: recordIds, fields, and\n structure. No document text. `mode:\"content\"` \u2014 one whole record.\n\n**Combining them.** Search finds a starting point by wording; navigate on a\n`recordId` reveals what search structurally cannot \u2014 siblings, children,\nlinked records, and the group's total count. For a question that must be\nexhaustive (\"all\", \"how many\", \"every\"), do NOT count search hits or trust a\nchat answer: navigate the record group, which reports the real total. For a\nrecord's siblings, navigate its parent \u2014 take the id from the `Path` line.\n\n**A named record** \u2014 an issue key, a Confluence / Drive / Slack link, an\nexternal ID \u2192 `mode:\"lookup\"` FIRST. It returns that record's metadata (for a\nticket: status, assignee, priority, dates) plus its `recordId`, which often\nanswers the question outright. Never guess a `recordId`.\n\nPass a source's id from `pipeshub_sources` as `apps: [\"<id>\"]` to search or\nchat, and as `nodeId` to navigate. Navigate and lookup end in a `Next:` line\nnaming the exact follow-up call \u2014 follow it.\n\n## Agents\n\nSome orgs configure **agents** for specific jobs (e.g. a Slack messenger, a\nJira ticket creator, a Salesforce CRM updater). To run a turn against an\nagent, call `pipeshub_chat` with its `agentId` (from `pipeshub_agents`)\n\u2014 optionally with an agent `chatMode` (`auto` by default, or `quick` /\n`verification` / `deep`). Keep passing the same `agentId` plus the\nreturned `conversationId` on follow-up turns.\n\n**When to route to an agent vs plain chat:**\n- The user names a system/action that maps to an agent (e.g. \"post to\n Slack\", \"create a Jira ticket\", \"update the Salesforce deal\") \u2192 call\n `pipeshub_agents`, pick the matching agent, and use it.\n- Plain question about the org's knowledge or the public web \u2192 just use\n `pipeshub_chat` (no `agentId`) with `internal_search` or `web_search`.\n\n**If you are unsure which agent or route fits the request**, call\n`pipeshub_agents` FIRST and read the returned names/descriptions, then\neither pick the best match or present the list to the user and let them\nchoose. Do NOT guess an agent blindly, and do NOT refuse \u2014 list the agents\nand decide from real data. The list may be empty (no agents configured),\nin which case fall back to plain `pipeshub_chat`.\n\n## Conversation lifecycle\n\n`pipeshub_chat` is a single tool that handles both starting and\ncontinuing conversations (plain or with an `agentId`). On the first turn\nomit `conversationId`; on every subsequent turn pass back the\n`conversationId` returned by the previous call (along with the same\n`agentId` if you used one). Server-side context is preserved \u2014 do NOT\nreplay prior messages. Only start a fresh conversation when the user\nexplicitly asks to clear context.\n";
2
2
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,q+JAoGjC,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,ukNAkIjC,CAAC"}
@@ -70,6 +70,36 @@ the user can verify.
70
70
  - \`pipeshub_agents\` — list the org's configured **agents** (specialized
71
71
  assistants with their own prompt, tools, and knowledge scope).
72
72
 
73
+ ## Knowledge Sources
74
+
75
+ A source (an app connector or a KB) holds record groups (a project, space,
76
+ drive, folder), which hold records (one ticket, page, file). Records nest —
77
+ an epic over its stories, a page over its child pages.
78
+
79
+ **Every tool returns metadata or content.**
80
+
81
+ - \`pipeshub_search\` / \`pipeshub_chat\` — content, but only a ranked sample of
82
+ blocks: never all blocks of a record, never every record that matches, never
83
+ a complete list of what exists.
84
+ - \`mode:"lookup"\` and \`mode:"navigate"\` — metadata: recordIds, fields, and
85
+ structure. No document text. \`mode:"content"\` — one whole record.
86
+
87
+ **Combining them.** Search finds a starting point by wording; navigate on a
88
+ \`recordId\` reveals what search structurally cannot — siblings, children,
89
+ linked records, and the group's total count. For a question that must be
90
+ exhaustive ("all", "how many", "every"), do NOT count search hits or trust a
91
+ chat answer: navigate the record group, which reports the real total. For a
92
+ record's siblings, navigate its parent — take the id from the \`Path\` line.
93
+
94
+ **A named record** — an issue key, a Confluence / Drive / Slack link, an
95
+ external ID → \`mode:"lookup"\` FIRST. It returns that record's metadata (for a
96
+ ticket: status, assignee, priority, dates) plus its \`recordId\`, which often
97
+ answers the question outright. Never guess a \`recordId\`.
98
+
99
+ Pass a source's id from \`pipeshub_sources\` as \`apps: ["<id>"]\` to search or
100
+ chat, and as \`nodeId\` to navigate. Navigate and lookup end in a \`Next:\` line
101
+ naming the exact follow-up call — follow it.
102
+
73
103
  ## Agents
74
104
 
75
105
  Some orgs configure **agents** for specific jobs (e.g. a Slack messenger, a
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGpC,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIpC,CAAC"}
@@ -1,8 +1,8 @@
1
+ import { bytesToBase64 } from "../lib/bytes-to-base64.js";
1
2
  type BinaryData = Uint8Array | ArrayBuffer | Blob | ReadableStream | Response | string;
2
- export declare function bytesToBase64(u8arr: Uint8Array): string;
3
+ export { bytesToBase64 };
3
4
  export declare function consumeStream(stream: ReadableStream<Uint8Array>): Promise<Uint8Array>;
4
5
  export declare function isAsyncIterable(value: unknown): value is AsyncIterable<string>;
5
6
  export declare function isBinaryData(value: unknown): value is BinaryData;
6
7
  export declare function valueToBase64(value: BinaryData | null | undefined): Promise<string | null>;
7
- export {};
8
8
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/mcp-server/shared.ts"],"names":[],"mappings":"AAMA,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,IAAI,GACJ,cAAc,GACd,QAAQ,GACR,MAAM,CAAC;AAIX,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEvD;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACjC,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAIhC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAShE;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACnC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBxB"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/mcp-server/shared.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,KAAK,UAAU,GACX,UAAU,GACV,WAAW,GACX,IAAI,GACJ,cAAc,GACd,QAAQ,GACR,MAAM,CAAC;AAIX,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GACjC,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAIhC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAShE;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACnC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBxB"}
@@ -1,11 +1,15 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ *
4
+ * Exception: `bytesToBase64` is imported from the hand-maintained
5
+ * `../lib/bytes-to-base64.js` (see that file and `.genignore`). Do not
6
+ * restore the generated one-liner — it overflows the stack on binary
7
+ * payloads.
3
8
  */
4
9
  import * as z from "zod";
10
+ import { bytesToBase64 } from "../lib/bytes-to-base64.js";
5
11
  const base64Schema = z.string().base64();
6
- export function bytesToBase64(u8arr) {
7
- return btoa(String.fromCodePoint(...u8arr));
8
- }
12
+ export { bytesToBase64 };
9
13
  export async function consumeStream(stream) {
10
14
  const reader = stream.getReader();
11
15
  const chunks = [];
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/mcp-server/shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC;AAEzC,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAAkC;IAElC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAA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