@forumone/throughline-integrations 0.5.0 → 0.7.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.
- package/CHANGELOG.md +100 -0
- package/README.md +2 -2
- package/dist/options.d.ts +1 -1
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +12 -34
- package/dist/plugin.js.map +1 -1
- package/dist/tools/descriptors.d.ts +26 -0
- package/dist/tools/descriptors.d.ts.map +1 -0
- package/dist/tools/descriptors.js +35 -0
- package/dist/tools/descriptors.js.map +1 -0
- package/dist/tools/get-integration-status.d.ts.map +1 -1
- package/dist/tools/get-integration-status.js +2 -2
- package/dist/tools/get-integration-status.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-integration-types.d.ts.map +1 -1
- package/dist/tools/list-integration-types.js +2 -2
- package/dist/tools/list-integration-types.js.map +1 -1
- package/dist/tools/list-integrations.d.ts.map +1 -1
- package/dist/tools/list-integrations.js +2 -2
- package/dist/tools/list-integrations.js.map +1 -1
- package/dist/tools/test-integration.d.ts.map +1 -1
- package/dist/tools/test-integration.js +2 -2
- package/dist/tools/test-integration.js.map +1 -1
- package/dist/tools/trigger-sync.d.ts.map +1 -1
- package/dist/tools/trigger-sync.js +2 -2
- package/dist/tools/trigger-sync.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,105 @@
|
|
|
1
1
|
# @forumone/throughline-integrations
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a9262da: Per-tool gating works, because tool names no longer wait for `onInit`
|
|
8
|
+
|
|
9
|
+
`@payloadcms/plugin-mcp` generates one per-key checkbox per tool while the host's
|
|
10
|
+
config is being built, and then gates every call on the checkbox matching the
|
|
11
|
+
tool's name. Every Throughline tool was built at `onInit` — each closes over
|
|
12
|
+
`payload`, the publishing service or the manifest loader — so the array it maps
|
|
13
|
+
over was empty, no checkboxes were generated, and its `?? false` denied all 27
|
|
14
|
+
tools to every key. A valid key got a 200 and an empty `tools/list`, with nothing
|
|
15
|
+
wrong on either side.
|
|
16
|
+
|
|
17
|
+
The plugin needs only `name` and `description` then, and neither needs a Payload.
|
|
18
|
+
So a server now **declares** its tools as the config is built and **binds** their
|
|
19
|
+
handlers at `onInit`:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
options.mcpTools?.declare(PUBLISHING_TOOL_DESCRIPTORS, { serverName: 'publishing' })
|
|
23
|
+
// …later, at onInit:
|
|
24
|
+
options.mcpTools?.add(tools, { serverName: 'publishing' })
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Each package gained a `tools/descriptors.ts` holding every tool's name and
|
|
28
|
+
description; the factories spread from it, so the checkbox and the MCP client
|
|
29
|
+
cannot describe a tool differently. A `descriptors.test.ts` in each package
|
|
30
|
+
asserts the two sets match, without needing a database.
|
|
31
|
+
|
|
32
|
+
`createMcpToolCollector` gains `declare()` and an `unbound` list. Both mismatches
|
|
33
|
+
are refused rather than absorbed: a tool built but never declared throws at
|
|
34
|
+
`onInit` (it would otherwise be denied to every key, silently), and a tool
|
|
35
|
+
declared but never bound stays advertised with a handler that explains itself.
|
|
36
|
+
|
|
37
|
+
**Order in the host's plugin array is now load-bearing.** Every tool-bearing
|
|
38
|
+
server must come before `mcpPlugin`, or it declares into an array that has
|
|
39
|
+
already been read. It was only a convention before; it is a requirement now, and
|
|
40
|
+
the failure mode — a server's tools missing from every key — is the one this
|
|
41
|
+
change exists to remove.
|
|
42
|
+
|
|
43
|
+
`requiredScope` stays declared and read by nothing. Enforcement is the checkbox;
|
|
44
|
+
these record which tools are consequential, and are the mapping a scope-aware
|
|
45
|
+
default would be built from.
|
|
46
|
+
|
|
47
|
+
The playground registers `mcpPlugin` for the first time, so the suite's only
|
|
48
|
+
end-to-end host now exercises the tools rather than just their composition.
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [a9262da]
|
|
53
|
+
- @forumone/throughline-core@0.8.0
|
|
54
|
+
|
|
55
|
+
## 0.6.0
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- 3140ea0: One MCP transport, not seven
|
|
60
|
+
|
|
61
|
+
Every plugin served its own `POST /<prefix>/mcp` on a 146-line JSON-RPC subset of
|
|
62
|
+
the protocol that spoke `tools/list` and `tools/call` and nothing else. Payload
|
|
63
|
+
ships an MCP server built on the official SDK — streamable HTTP, sessions, per-key
|
|
64
|
+
capability checkboxes — and the tools were never the transport. They now reach a
|
|
65
|
+
client through the host's `@payloadcms/plugin-mcp`, on one `/api/mcp`, via the
|
|
66
|
+
collector `createMcpToolCollector` already provided.
|
|
67
|
+
|
|
68
|
+
**Breaking.** Removed from `@forumone/throughline-core`: `createMcpHandler`,
|
|
69
|
+
`McpHandlerOptions`, `createApiKeysCollection`, `ApiKeysCollectionOptions`,
|
|
70
|
+
`DEFAULT_API_KEYS_SLUG`, `createBearerTokenAuthenticator`,
|
|
71
|
+
`BearerTokenAuthenticatorOptions`, `generateApiKey`. Removed from
|
|
72
|
+
`@forumone/throughline-plugin-contract`: `McpAuthenticator`, `McpAuthResult`.
|
|
73
|
+
`sha256Hex` stays exported, from `./utils` rather than `./auth`.
|
|
74
|
+
|
|
75
|
+
`routePrefix` is gone from `auditQueryPlugin`, `componentsPlugin` and
|
|
76
|
+
`integrationsPlugin` — omitted from their options types, so passing one is a
|
|
77
|
+
compile error rather than config that reads as if it does something. `/mcp` was
|
|
78
|
+
the only endpoint any of the three served. `publishingPlugin`, `approvalsPlugin`
|
|
79
|
+
and `formsPlugin` keep theirs; they still serve admin controls, the approval
|
|
80
|
+
action link and the public form post.
|
|
81
|
+
|
|
82
|
+
**A host that passes no `mcpTools` collector now has no MCP surface.** There is no
|
|
83
|
+
per-server endpoint left as a fallback. This is a config change of one line per
|
|
84
|
+
plugin, and `createMcpToolCollector`'s own docs carry the shape.
|
|
85
|
+
|
|
86
|
+
**What this costs, stated plainly.** `requiredScope` is now read by nothing —
|
|
87
|
+
`plugin-mcp` gates on checkboxes generated at config time, which this suite cannot
|
|
88
|
+
fill because every tool is built at `onInit`. So a key that authenticates reaches
|
|
89
|
+
every collected tool, exactly as an all-or-nothing per-server key did. The
|
|
90
|
+
declarations are kept because they are the mapping those checkboxes need; #78
|
|
91
|
+
tracks restoring enforcement, and the type's own doc comment says so.
|
|
92
|
+
|
|
93
|
+
Also drops the key collection from the playground, which leaves that app with no
|
|
94
|
+
MCP surface at all until `mcpPlugin` can be wired there — #79, blocked on moving
|
|
95
|
+
it off `payload@^3.83.0`.
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [3140ea0]
|
|
100
|
+
- @forumone/throughline-plugin-contract@0.4.0
|
|
101
|
+
- @forumone/throughline-core@0.7.0
|
|
102
|
+
|
|
3
103
|
## 0.5.0
|
|
4
104
|
|
|
5
105
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Plugin architecture for connecting Throughline-powered Payload sites to external
|
|
|
7
7
|
- **`Integration` contract** — id, name, description, configFields, validateConfig, subscribes, createFunctions, mcpTools (optional), healthcheck. Every Salesforce / Mailchimp / Slack / etc. integration uses this exact shape.
|
|
8
8
|
- **`IntegrationRegistry`** — process-local, per-plugin-init store keyed by integration id. Rejects duplicates synchronously.
|
|
9
9
|
- **Integrations collection** — `name`, `integrationType`, `enabled`, `config` (json), and read-only `lastSyncAt` / `lastSyncStatus` / `lastError`. Admin-only writes; admin/editor reads.
|
|
10
|
-
- **Five MCP tools
|
|
10
|
+
- **Five MCP tools**, handed to the host's collector at `onInit` and served by `@payloadcms/plugin-mcp` on one `/api/mcp`. Pass `mcpTools` or they reach nobody:
|
|
11
11
|
|
|
12
12
|
| Tool | Use it for | Access |
|
|
13
13
|
|---|---|---|
|
|
@@ -101,7 +101,7 @@ The HMAC is computed over the entire request body (a JSON-stringified envelope o
|
|
|
101
101
|
| `inngest` | `Inngest` | required | Throws at validate if missing |
|
|
102
102
|
| `integrations` | `Integration[]` | `[]` | Appended to the built-in webhook integration |
|
|
103
103
|
| `collectionSlug` | `string` | `'integrations'` | |
|
|
104
|
-
| `
|
|
104
|
+
| `mcpTools` | `McpToolCollector` | — | The host's collector. Without it these five tools are unreachable. This plugin serves no HTTP endpoint of its own and takes no `routePrefix` |
|
|
105
105
|
| `enabled` | `boolean` | `true` | Set to false to no-op |
|
|
106
106
|
| `logger` | `Logger` | `defaultLogger` | |
|
|
107
107
|
|
package/dist/options.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Inngest } from 'inngest';
|
|
|
3
3
|
import type { BaseCorePluginOptions } from '@forumone/throughline-plugin-contract';
|
|
4
4
|
import type { Integration } from './types.js';
|
|
5
5
|
export declare const DEFAULT_INTEGRATIONS_SLUG = "integrations";
|
|
6
|
-
export interface IntegrationsPluginOptions extends BaseCorePluginOptions {
|
|
6
|
+
export interface IntegrationsPluginOptions extends Omit<BaseCorePluginOptions, 'routePrefix'> {
|
|
7
7
|
/**
|
|
8
8
|
* Inngest client used to register integration functions and to fire
|
|
9
9
|
* manual-sync trigger events. Required: integrations are an
|
package/dist/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAOvD,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC;IAC3F;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,yBAAyB,CAK7F"}
|
package/dist/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAA;AAsCvD,MAAM,UAAU,eAAe,CAAC,OAAkC;IAChE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAA;IACvF,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,uCAAuC,CAAA;AAG1F,OAAO,EAAE,KAAK,yBAAyB,EAA8C,MAAM,cAAc,CAAA;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAGnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAgBpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CA+HlE,CAAA;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,GAAG,OAAO,EACjD,OAAO,EAAE,OAAO,GACf,mBAAmB,CAAC,EAAE,CAAC,GAAG,SAAS,CAIrC;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAEtF"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { getPluginRegistry } from '@forumone/throughline-plugin-contract';
|
|
2
|
-
import {
|
|
2
|
+
import { createNamedLogger, defaultLogger, getAuditWriter } from '@forumone/throughline-core';
|
|
3
3
|
import { validateOptions, DEFAULT_INTEGRATIONS_SLUG } from './options.js';
|
|
4
4
|
import { IntegrationRegistry } from './registry.js';
|
|
5
5
|
import { createIntegrationsCollection } from './collection.js';
|
|
6
6
|
import { webhookIntegration } from './integrations/index.js';
|
|
7
|
-
import { createGetIntegrationStatusTool, createListIntegrationsTool, createListIntegrationTypesTool, createTestIntegrationTool, createTriggerSyncTool, } from './tools/index.js';
|
|
7
|
+
import { INTEGRATIONS_TOOL_DESCRIPTORS, createGetIntegrationStatusTool, createListIntegrationsTool, createListIntegrationTypesTool, createTestIntegrationTool, createTriggerSyncTool, } from './tools/index.js';
|
|
8
8
|
const PLUGIN_ID = '@forumone/throughline-integrations';
|
|
9
9
|
const PLUGIN_VERSION = '0.1.0';
|
|
10
|
-
const MCP_HANDLER_SYMBOL = Symbol.for('@forumone/throughline/integrations-mcp-handler');
|
|
11
10
|
const REGISTRY_SYMBOL = Symbol.for('@forumone/throughline/integrations-registry');
|
|
12
11
|
const CONTEXT_SYMBOL = Symbol.for('@forumone/throughline/integrations-context');
|
|
13
12
|
/**
|
|
@@ -26,7 +25,6 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
26
25
|
return incomingConfig;
|
|
27
26
|
const options = validateOptions(rawOptions);
|
|
28
27
|
const collectionSlug = options.collectionSlug ?? DEFAULT_INTEGRATIONS_SLUG;
|
|
29
|
-
const routePrefix = options.routePrefix ?? '/integrations';
|
|
30
28
|
const logger = createNamedLogger('integrations', options.logger ?? defaultLogger);
|
|
31
29
|
const registry = new IntegrationRegistry();
|
|
32
30
|
registry.register(webhookIntegration);
|
|
@@ -34,23 +32,16 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
34
32
|
registry.register(integration);
|
|
35
33
|
}
|
|
36
34
|
const collection = createIntegrationsCollection({ slug: collectionSlug, registry });
|
|
35
|
+
/*
|
|
36
|
+
Declared here, bound at `onInit` — `mcpPlugin` generates its per-key
|
|
37
|
+
checkboxes from these names and descriptions while the config is built, and
|
|
38
|
+
denies any tool it has no checkbox for. This plugin must therefore come
|
|
39
|
+
before `mcpPlugin` in the host's array.
|
|
40
|
+
*/
|
|
41
|
+
options.mcpTools?.declare(INTEGRATIONS_TOOL_DESCRIPTORS, { serverName: 'integrations' });
|
|
37
42
|
return {
|
|
38
43
|
...incomingConfig,
|
|
39
44
|
collections: [...(incomingConfig.collections ?? []), collection],
|
|
40
|
-
endpoints: [
|
|
41
|
-
...(incomingConfig.endpoints ?? []),
|
|
42
|
-
{
|
|
43
|
-
path: `${routePrefix}/mcp`,
|
|
44
|
-
method: 'post',
|
|
45
|
-
handler: async (req) => {
|
|
46
|
-
const handler = req.payload[MCP_HANDLER_SYMBOL];
|
|
47
|
-
if (!handler) {
|
|
48
|
-
return new Response(JSON.stringify({ error: 'Integrations MCP not initialized' }), { status: 503, headers: { 'content-type': 'application/json' } });
|
|
49
|
-
}
|
|
50
|
-
return handler(req);
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
45
|
onInit: async (payload) => {
|
|
55
46
|
if (incomingConfig.onInit)
|
|
56
47
|
await incomingConfig.onInit(payload);
|
|
@@ -116,22 +107,10 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
116
107
|
createTestIntegrationTool({ ...deps, registry }),
|
|
117
108
|
createListIntegrationTypesTool({ registry }),
|
|
118
109
|
];
|
|
119
|
-
// Payload's own MCP plugin,
|
|
120
|
-
//
|
|
121
|
-
//
|
|
110
|
+
// Payload's own MCP plugin, and the only transport these tools have.
|
|
111
|
+
// `onInit` is both the earliest they can exist and still early enough
|
|
112
|
+
// that `mcpPlugin` reads the array populated.
|
|
122
113
|
options.mcpTools?.add(tools, { serverName: 'integrations', logger });
|
|
123
|
-
const handler = createMcpHandler({
|
|
124
|
-
payload,
|
|
125
|
-
serverName: 'integrations',
|
|
126
|
-
tools,
|
|
127
|
-
logger,
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(payload, MCP_HANDLER_SYMBOL, {
|
|
130
|
-
value: handler,
|
|
131
|
-
enumerable: false,
|
|
132
|
-
writable: false,
|
|
133
|
-
configurable: false,
|
|
134
|
-
});
|
|
135
114
|
Object.defineProperty(payload, REGISTRY_SYMBOL, {
|
|
136
115
|
value: registry,
|
|
137
116
|
enumerable: false,
|
|
@@ -151,7 +130,6 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
151
130
|
});
|
|
152
131
|
logger.info('Integrations server ready', {
|
|
153
132
|
collectionSlug,
|
|
154
|
-
routePrefix,
|
|
155
133
|
integrationCount: registry.size,
|
|
156
134
|
});
|
|
157
135
|
},
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAAkC,eAAe,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,kBAAkB,CAAA;AAEzB,MAAM,SAAS,GAAG,oCAAoC,CAAA;AACtD,MAAM,cAAc,GAAG,OAAO,CAAA;AAE9B,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAA;AACjF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAA;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,cAAc,EAAE,EAAE;IACjC,IA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C,CAAA;YAEpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE;gBAC9C,KAAK,EAAE,QAAQ;gBACf,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;aACpB,CAAC,CAAA;YACF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE;gBAC7C,KAAK,EAAE,OAAO;gBACd,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;aACpB,CAAC,CAAA;YAEF,cAAc,CAAC,QAAQ,CAAC;gBACtB,EAAE,EAAE,SAAS;gBACb,OAAO,EAAE,cAAc;gBACvB,YAAY,EAAE,CAAC,cAAc,EAAE,sBAAsB,CAAC;aACvD,CAAC,CAAA;YAEF,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE;gBACvC,cAAc;gBACd,gBAAgB,EAAE,QAAQ,CAAC,IAAI;aAChC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAgB;IAEhB,OAAQ,OAAmC,CAAC,eAAe,CAE9C,CAAA;AACf,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAQ,OAAmC,CAAC,cAAc,CAAmC,CAAA;AAC/F,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { McpToolDescriptor } from '@forumone/throughline-core';
|
|
2
|
+
export declare const INTEGRATIONS_TOOLS: {
|
|
3
|
+
readonly listIntegrations: {
|
|
4
|
+
readonly name: "list_integrations";
|
|
5
|
+
readonly description: "Lists configured integration instances and their last-sync status. Use to answer \"what connections are set up?\" or \"is the webhook to Slack still working?\". Read-only.";
|
|
6
|
+
};
|
|
7
|
+
readonly getIntegrationStatus: {
|
|
8
|
+
readonly name: "get_integration_status";
|
|
9
|
+
readonly description: "Detailed status for a single integration instance — including its last sync time, last error, and current configuration metadata (config values themselves are admin-only and not returned).";
|
|
10
|
+
};
|
|
11
|
+
readonly triggerSync: {
|
|
12
|
+
readonly name: "trigger_sync";
|
|
13
|
+
readonly description: "Manually triggers an integration to send a test payload. Useful for verifying connectivity after a config change or after the integration has been failing. Admin-only because triggering an external POST is a write-side action.";
|
|
14
|
+
};
|
|
15
|
+
readonly testIntegration: {
|
|
16
|
+
readonly name: "test_integration";
|
|
17
|
+
readonly description: "Calls the integration's healthcheck. Use to answer 'is the integration reachable / configured correctly?'. Doesn't fire any system events; the test is local to the integration's healthcheck.";
|
|
18
|
+
};
|
|
19
|
+
readonly listIntegrationTypes: {
|
|
20
|
+
readonly name: "list_integration_types";
|
|
21
|
+
readonly description: "Lists the integration plugins available in this deployment. Use when answering \"what kinds of integrations are supported here?\" or before suggesting that someone add a new instance.";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Every tool this server contributes, for the collector. */
|
|
25
|
+
export declare const INTEGRATIONS_TOOL_DESCRIPTORS: readonly McpToolDescriptor[];
|
|
26
|
+
//# sourceMappingURL=descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptors.d.ts","sourceRoot":"","sources":["../../src/tools/descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAYnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CA0BuB,CAAA;AAEtD,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B,EAAE,SAAS,iBAAiB,EACnC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This server's tools, by name and description, knowable without a Payload.
|
|
3
|
+
|
|
4
|
+
`@payloadcms/plugin-mcp` reads exactly these two fields while the host's config
|
|
5
|
+
is being built, to generate one per-key checkbox per tool, and denies any tool it
|
|
6
|
+
has no checkbox for. The handlers close over `payload` and the integration
|
|
7
|
+
registry, so they cannot exist that early — the names never needed to wait.
|
|
8
|
+
|
|
9
|
+
The factories below spread these, so the two cannot drift.
|
|
10
|
+
*/
|
|
11
|
+
export const INTEGRATIONS_TOOLS = {
|
|
12
|
+
listIntegrations: {
|
|
13
|
+
name: 'list_integrations',
|
|
14
|
+
description: 'Lists configured integration instances and their last-sync status. Use to answer "what connections are set up?" or "is the webhook to Slack still working?". Read-only.',
|
|
15
|
+
},
|
|
16
|
+
getIntegrationStatus: {
|
|
17
|
+
name: 'get_integration_status',
|
|
18
|
+
description: 'Detailed status for a single integration instance — including its last sync time, last error, and current configuration metadata (config values themselves are admin-only and not returned).',
|
|
19
|
+
},
|
|
20
|
+
triggerSync: {
|
|
21
|
+
name: 'trigger_sync',
|
|
22
|
+
description: 'Manually triggers an integration to send a test payload. Useful for verifying connectivity after a config change or after the integration has been failing. Admin-only because triggering an external POST is a write-side action.',
|
|
23
|
+
},
|
|
24
|
+
testIntegration: {
|
|
25
|
+
name: 'test_integration',
|
|
26
|
+
description: "Calls the integration's healthcheck. Use to answer 'is the integration reachable / configured correctly?'. Doesn't fire any system events; the test is local to the integration's healthcheck.",
|
|
27
|
+
},
|
|
28
|
+
listIntegrationTypes: {
|
|
29
|
+
name: 'list_integration_types',
|
|
30
|
+
description: 'Lists the integration plugins available in this deployment. Use when answering "what kinds of integrations are supported here?" or before suggesting that someone add a new instance.',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
/** Every tool this server contributes, for the collector. */
|
|
34
|
+
export const INTEGRATIONS_TOOL_DESCRIPTORS = Object.values(INTEGRATIONS_TOOLS);
|
|
35
|
+
//# sourceMappingURL=descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptors.js","sourceRoot":"","sources":["../../src/tools/descriptors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;EASE;AACF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,gBAAgB,EAAE;QAChB,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,yKAAyK;KAC5K;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,8LAA8L;KACjM;IACD,WAAW,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,oOAAoO;KACvO;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,gMAAgM;KACnM;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,uLAAuL;KAC1L;CACmD,CAAA;AAEtD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,6BAA6B,GACxC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-integration-status.d.ts","sourceRoot":"","sources":["../../src/tools/get-integration-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"get-integration-status.d.ts","sourceRoot":"","sources":["../../src/tools/get-integration-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAI9E,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,QAAA,MAAM,WAAW;;;;;;EAIf,CAAA;AAEF,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,wBAAwB,GAC7B,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAgCvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { deniedEnvelope, isIntegrationsReader } from './access.js';
|
|
3
|
+
import { INTEGRATIONS_TOOLS } from './descriptors.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
integrationId: z
|
|
5
6
|
.string()
|
|
@@ -7,8 +8,7 @@ const inputSchema = z.object({
|
|
|
7
8
|
});
|
|
8
9
|
export function createGetIntegrationStatusTool(deps) {
|
|
9
10
|
return {
|
|
10
|
-
|
|
11
|
-
description: 'Detailed status for a single integration instance — including its last sync time, last error, and current configuration metadata (config values themselves are admin-only and not returned).',
|
|
11
|
+
...INTEGRATIONS_TOOLS.getIntegrationStatus,
|
|
12
12
|
inputSchema,
|
|
13
13
|
handler: async (input, ctx) => {
|
|
14
14
|
if (!isIntegrationsReader(ctx)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-integration-status.js","sourceRoot":"","sources":["../../src/tools/get-integration-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"get-integration-status.js","sourceRoot":"","sources":["../../src/tools/get-integration-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAOrD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,yEAAyE,CAAC;CACvF,CAAC,CAAA;AAEF,MAAM,UAAU,8BAA8B,CAC5C,IAA8B;IAE9B,OAAO;QACL,GAAG,kBAAkB,CAAC,o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C,IAAI;aAC1E,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { INTEGRATIONS_TOOLS, INTEGRATIONS_TOOL_DESCRIPTORS } from './descriptors.js';
|
|
1
2
|
export { createListIntegrationsTool } from './list-integrations.js';
|
|
2
3
|
export type { ListIntegrationsDeps } from './list-integrations.js';
|
|
3
4
|
export { createGetIntegrationStatusTool } from './get-integration-status.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { INTEGRATIONS_TOOLS, INTEGRATIONS_TOOL_DESCRIPTORS } from './descriptors.js';
|
|
1
2
|
export { createListIntegrationsTool } from './list-integrations.js';
|
|
2
3
|
export { createGetIntegrationStatusTool } from './get-integration-status.js';
|
|
3
4
|
export { createTriggerSyncTool } from './trigger-sync.js';
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-integration-types.d.ts","sourceRoot":"","sources":["../../src/tools/list-integration-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"list-integration-types.d.ts","sourceRoot":"","sources":["../../src/tools/list-integration-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAGzD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,mBAAmB,CAAA;CAC9B;AAED,QAAA,MAAM,WAAW,iDAAwB,CAAA;AAEzC,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,wBAAwB,GAC7B,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAiBvC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { INTEGRATIONS_TOOLS } from './descriptors.js';
|
|
2
3
|
const inputSchema = z.object({}).strict();
|
|
3
4
|
export function createListIntegrationTypesTool(deps) {
|
|
4
5
|
return {
|
|
5
|
-
|
|
6
|
-
description: 'Lists the integration plugins available in this deployment. Use when answering "what kinds of integrations are supported here?" or before suggesting that someone add a new instance.',
|
|
6
|
+
...INTEGRATIONS_TOOLS.listIntegrationTypes,
|
|
7
7
|
inputSchema,
|
|
8
8
|
handler: async () => {
|
|
9
9
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-integration-types.js","sourceRoot":"","sources":["../../src/tools/list-integration-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"list-integration-types.js","sourceRoot":"","sources":["../../src/tools/list-integration-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAMrD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;AAEzC,MAAM,UAAU,8BAA8B,CAC5C,IAA8B;IAE9B,OAAO;QACL,GAAG,kBAAkB,CAAC,oBAAoB;QAC1C,WAAW;QACX,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;oBAChD,EAAE,EAAE,WAAW,CAAC,EAAE;oBAClB,IAAI,EAAE,WAAW,CAAC,IAAI;oBACtB,WAAW,EAAE,WAAW,CAAC,WAAW;oBACpC,QAAQ,EAAE,WAAW,CAAC,QAAQ;oBAC9B,YAAY,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;oBACxD,cAAc,EAAE,OAAO,WAAW,CAAC,WAAW,KAAK,UAAU;iBAC9D,CAAC,CAAC;aACJ,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-integrations.d.ts","sourceRoot":"","sources":["../../src/tools/list-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"list-integrations.d.ts","sourceRoot":"","sources":["../../src/tools/list-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAI9E,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,QAAA,MAAM,WAAW;;;;;;;;;EASf,CAAA;AAEF,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,oBAAoB,GACzB,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAmCvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { deniedEnvelope, isIntegrationsReader } from './access.js';
|
|
3
|
+
import { INTEGRATIONS_TOOLS } from './descriptors.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
integrationType: z
|
|
5
6
|
.string()
|
|
@@ -12,8 +13,7 @@ const inputSchema = z.object({
|
|
|
12
13
|
});
|
|
13
14
|
export function createListIntegrationsTool(deps) {
|
|
14
15
|
return {
|
|
15
|
-
|
|
16
|
-
description: 'Lists configured integration instances and their last-sync status. Use to answer "what connections are set up?" or "is the webhook to Slack still working?". Read-only.',
|
|
16
|
+
...INTEGRATIONS_TOOLS.listIntegrations,
|
|
17
17
|
inputSchema,
|
|
18
18
|
handler: async (input, ctx) => {
|
|
19
19
|
if (!isIntegrationsReader(ctx)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-integrations.js","sourceRoot":"","sources":["../../src/tools/list-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"list-integrations.js","sourceRoot":"","sources":["../../src/tools/list-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAOrD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,eAAe,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACtE,WAAW,EAAE,CAAC;SACX,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,sDAAsD,CAAC;CACpE,CAAC,CAAA;AAEF,MAAM,UAAU,0BAA0B,CACxC,IAA0B;IAE1B,OAAO;QACL,GAAG,kBAAkB,CAAC,gBAAgB;QACtC,WAAW;QACX,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/B,OAAO,cAAc,CAAC,gDAAg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AG,CAAC,gBAAgB,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,WAAW;oBAC/F,SAAS,EAAE,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;iBAC/E,CAAC,CAAC;aACJ,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-integration.d.ts","sourceRoot":"","sources":["../../src/tools/test-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"test-integration.d.ts","sourceRoot":"","sources":["../../src/tools/test-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAIzD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,mBAAmB,CAAA;CAC9B;AAED,QAAA,MAAM,WAAW;;;;;;EAEf,CAAA;AAEF,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,mBAAmB,GACxB,iBAAiB,CAAC,OAAO,WAAW,CAAC,CA+CvC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { deniedEnvelope, isIntegrationsReader } from './access.js';
|
|
3
|
+
import { INTEGRATIONS_TOOLS } from './descriptors.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
integrationId: z.string().describe('The instance ID to test.'),
|
|
5
6
|
});
|
|
6
7
|
export function createTestIntegrationTool(deps) {
|
|
7
8
|
return {
|
|
8
|
-
|
|
9
|
+
...INTEGRATIONS_TOOLS.testIntegration,
|
|
9
10
|
requiredScope: 'integrations.trigger',
|
|
10
|
-
description: "Calls the integration's healthcheck. Use to answer 'is the integration reachable / configured correctly?'. Doesn't fire any system events; the test is local to the integration's healthcheck.",
|
|
11
11
|
inputSchema,
|
|
12
12
|
handler: async (input, ctx) => {
|
|
13
13
|
if (!isIntegrationsReader(ctx)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-integration.js","sourceRoot":"","sources":["../../src/tools/test-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"test-integration.js","sourceRoot":"","sources":["../../src/tools/test-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAQrD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CAC/D,CAAC,CAAA;AAEF,MAAM,UAAU,yBAAyB,CACvC,IAAyB;IAEzB,OAAO;QACL,GAAG,kBAAkB,CAAC,eAAe;QACrC,aAAa,EAAE,sBAAsB;QACrC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M,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACjC,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,MAAM,CAAC,EAAE;gBAClB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,IAAI;aAChC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-sync.d.ts","sourceRoot":"","sources":["../../src/tools/trigger-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"trigger-sync.d.ts","sourceRoot":"","sources":["../../src/tools/trigger-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAI9E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,WAAW;;;;;;;;;EAQf,CAAA;AAEF,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,eAAe,GACpB,iBAAiB,CAAC,OAAO,WAAW,CAAC,CAkDvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { deniedEnvelope, isIntegrationsAdmin } from './access.js';
|
|
3
|
+
import { INTEGRATIONS_TOOLS } from './descriptors.js';
|
|
3
4
|
const inputSchema = z.object({
|
|
4
5
|
integrationId: z
|
|
5
6
|
.string()
|
|
@@ -11,9 +12,8 @@ const inputSchema = z.object({
|
|
|
11
12
|
});
|
|
12
13
|
export function createTriggerSyncTool(deps) {
|
|
13
14
|
return {
|
|
14
|
-
|
|
15
|
+
...INTEGRATIONS_TOOLS.triggerSync,
|
|
15
16
|
requiredScope: 'integrations.trigger',
|
|
16
|
-
description: 'Manually triggers an integration to send a test payload. Useful for verifying connectivity after a config change or after the integration has been failing. Admin-only because triggering an external POST is a write-side action.',
|
|
17
17
|
inputSchema,
|
|
18
18
|
handler: async (input, ctx) => {
|
|
19
19
|
if (!isIntegrationsAdmin(ctx)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-sync.js","sourceRoot":"","sources":["../../src/tools/trigger-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"trigger-sync.js","sourceRoot":"","sources":["../../src/tools/trigger-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAQrD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,CAAC,4DAA4D,CAAC;IACzE,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2DAA2D,CAAC;CACzE,CAAC,CAAA;AAEF,MAAM,UAAU,qBAAqB,CACnC,IAAqB;IAErB,OAAO;QACL,GAAG,kBAAkB,CAAC,WAAW;QACjC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AAC,aAAa;oBAC/B,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;oBACjC,IAAI,EAAE,eAAe;iBACtB;gBACD,OAAO,EAAE,8BAA8B,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,uFAAuF;aAClJ,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forumone/throughline-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Plugin architecture for connecting Throughline-powered Payload sites to external systems. Ships the Integration contract, registry, collection, MCP tools, and a generic outbound-webhook integration as the first concrete example.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"zod": "^3.23.0",
|
|
45
|
-
"@forumone/throughline-core": "0.
|
|
46
|
-
"@forumone/throughline-plugin-contract": "0.
|
|
45
|
+
"@forumone/throughline-core": "0.8.0",
|
|
46
|
+
"@forumone/throughline-plugin-contract": "0.4.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^20.17.0",
|