@forumone/throughline-integrations 0.4.0 → 0.6.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 +86 -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 +17 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +20 -33
- package/dist/plugin.js.map +1 -1
- package/dist/registry.d.ts +16 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +12 -0
- package/dist/registry.js.map +1 -1
- package/dist/tools/access.d.ts +1 -3
- package/dist/tools/access.d.ts.map +1 -1
- package/dist/tools/access.js +2 -3
- package/dist/tools/access.js.map +1 -1
- package/dist/types.d.ts +19 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,91 @@
|
|
|
1
1
|
# @forumone/throughline-integrations
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3140ea0: One MCP transport, not seven
|
|
8
|
+
|
|
9
|
+
Every plugin served its own `POST /<prefix>/mcp` on a 146-line JSON-RPC subset of
|
|
10
|
+
the protocol that spoke `tools/list` and `tools/call` and nothing else. Payload
|
|
11
|
+
ships an MCP server built on the official SDK — streamable HTTP, sessions, per-key
|
|
12
|
+
capability checkboxes — and the tools were never the transport. They now reach a
|
|
13
|
+
client through the host's `@payloadcms/plugin-mcp`, on one `/api/mcp`, via the
|
|
14
|
+
collector `createMcpToolCollector` already provided.
|
|
15
|
+
|
|
16
|
+
**Breaking.** Removed from `@forumone/throughline-core`: `createMcpHandler`,
|
|
17
|
+
`McpHandlerOptions`, `createApiKeysCollection`, `ApiKeysCollectionOptions`,
|
|
18
|
+
`DEFAULT_API_KEYS_SLUG`, `createBearerTokenAuthenticator`,
|
|
19
|
+
`BearerTokenAuthenticatorOptions`, `generateApiKey`. Removed from
|
|
20
|
+
`@forumone/throughline-plugin-contract`: `McpAuthenticator`, `McpAuthResult`.
|
|
21
|
+
`sha256Hex` stays exported, from `./utils` rather than `./auth`.
|
|
22
|
+
|
|
23
|
+
`routePrefix` is gone from `auditQueryPlugin`, `componentsPlugin` and
|
|
24
|
+
`integrationsPlugin` — omitted from their options types, so passing one is a
|
|
25
|
+
compile error rather than config that reads as if it does something. `/mcp` was
|
|
26
|
+
the only endpoint any of the three served. `publishingPlugin`, `approvalsPlugin`
|
|
27
|
+
and `formsPlugin` keep theirs; they still serve admin controls, the approval
|
|
28
|
+
action link and the public form post.
|
|
29
|
+
|
|
30
|
+
**A host that passes no `mcpTools` collector now has no MCP surface.** There is no
|
|
31
|
+
per-server endpoint left as a fallback. This is a config change of one line per
|
|
32
|
+
plugin, and `createMcpToolCollector`'s own docs carry the shape.
|
|
33
|
+
|
|
34
|
+
**What this costs, stated plainly.** `requiredScope` is now read by nothing —
|
|
35
|
+
`plugin-mcp` gates on checkboxes generated at config time, which this suite cannot
|
|
36
|
+
fill because every tool is built at `onInit`. So a key that authenticates reaches
|
|
37
|
+
every collected tool, exactly as an all-or-nothing per-server key did. The
|
|
38
|
+
declarations are kept because they are the mapping those checkboxes need; #78
|
|
39
|
+
tracks restoring enforcement, and the type's own doc comment says so.
|
|
40
|
+
|
|
41
|
+
Also drops the key collection from the playground, which leaves that app with no
|
|
42
|
+
MCP surface at all until `mcpPlugin` can be wired there — #79, blocked on moving
|
|
43
|
+
it off `payload@^3.83.0`.
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [3140ea0]
|
|
48
|
+
- @forumone/throughline-plugin-contract@0.4.0
|
|
49
|
+
- @forumone/throughline-core@0.7.0
|
|
50
|
+
|
|
51
|
+
## 0.5.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- 0d7501d: `Integration.createFunctions` is generic in its return type
|
|
56
|
+
|
|
57
|
+
It named `InngestFunction.Any`, and nothing in this package inspects or invokes what comes back — the one use anywhere is `.length`, for a log line saying how many functions an integration contributed. The host serves them.
|
|
58
|
+
|
|
59
|
+
Naming the type cost a consumer two casts. pnpm keys an `inngest` instance by its resolved peer set, and `inngest` declares optional peers on `express`, `hono` and `next` — so a host that installs anything pulling one of those in (in this case `@payloadcms/plugin-mcp`, via `mcp-handler`) ends up with a structurally identical, nominally different `InngestFunction.Any`, and the assignment stops compiling.
|
|
60
|
+
|
|
61
|
+
Generic, the host's own type flows through:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export const myIntegration: Integration<MyConfig, InngestFunction.Any> = { … }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`unknown` by default, so nothing existing has to change — `webhookIntegration` in this package is untouched.
|
|
68
|
+
|
|
69
|
+
- 88d7e4f: `IntegrationRegistry` and `getIntegrationRegistry` are generic in the function type too
|
|
70
|
+
|
|
71
|
+
Making `Integration.createFunctions` generic was half the fix: the registry still stored integrations at the default `unknown`, so `list()` handed back `unknown[]` and a host had to assert its way back to its own Inngest type before calling `serve()` — the assertion the generic existed to delete.
|
|
72
|
+
|
|
73
|
+
`getIntegrationRegistry<InngestFunction.Any>(payload)` now names it once, where the host reads the registry, and the type survives the round trip.
|
|
74
|
+
|
|
75
|
+
`unknown` by default, so nothing existing changes.
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- 9131065: Three helpers that existed once per package now exist once
|
|
80
|
+
- **`unwrapRelationshipId`** had four definitions — three private to `approvals`, one exported from `email` — differing only in a null guard that `typeof value === 'string'` already covers. One deliberate change comes with the move: none of the four handled a _numeric_ id, so on Postgres at `depth: 0` they returned `null` for a relationship that was populated fine. No caller reads at depth 0 today, so this fixes nothing and stops a shared helper being wrong for the first caller that does.
|
|
81
|
+
- **`deniedEnvelope`** had three identical definitions, one per server with an access predicate. The role predicates stay where they are: what counts as an audit reader is not what counts as a forms author, and collapsing those would put one package's policy in another's file.
|
|
82
|
+
- **The MCP handler rebuilt `createNamedLogger` inline**, forty lines from the real one in the same package.
|
|
83
|
+
|
|
84
|
+
Nothing else in the duplication audit survived checking. `createFakePayload` has six definitions and three distinct implementations — a query engine, a two-line map read, and a stateful form store — which share a name and nothing else; merging them means building a fake that does all three jobs. `createFakeInngest` has one definition and three importers. The six MCP endpoint stanzas are real duplication that should be deleted rather than merged, once hosts move to `@payloadcms/plugin-mcp`.
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [9131065]
|
|
87
|
+
- @forumone/throughline-core@0.6.0
|
|
88
|
+
|
|
3
89
|
## 0.4.0
|
|
4
90
|
|
|
5
91
|
### 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
CHANGED
|
@@ -14,6 +14,22 @@ import type { IntegrationContext } from './types.js';
|
|
|
14
14
|
* `docs/integrations-wiring.md` in the repository root.
|
|
15
15
|
*/
|
|
16
16
|
export declare const integrationsPlugin: CorePlugin<IntegrationsPluginOptions>;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The registry this plugin attached at init, if it did.
|
|
19
|
+
*
|
|
20
|
+
* `Fn` is the host's own Inngest function type. Naming it is what lets the host
|
|
21
|
+
* serve `createFunctions()` results without asserting them back — the registry
|
|
22
|
+
* stores integrations at `unknown` otherwise, and an `unknown[]` cannot be
|
|
23
|
+
* handed to `serve()`:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* There is no checking behind it either way — the value comes off a symbol on
|
|
30
|
+
* the Payload instance. What the parameter buys is that the assertion happens
|
|
31
|
+
* once, here, in terms of the host's own types, rather than at every read.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getIntegrationRegistry<Fn = unknown>(payload: unknown): IntegrationRegistry<Fn> | undefined;
|
|
18
34
|
export declare function getIntegrationContext(payload: unknown): IntegrationContext | undefined;
|
|
19
35
|
//# sourceMappingURL=plugin.d.ts.map
|
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;AAepD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAuHlE,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,5 +1,5 @@
|
|
|
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';
|
|
@@ -7,7 +7,6 @@ import { webhookIntegration } from './integrations/index.js';
|
|
|
7
7
|
import { 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);
|
|
@@ -37,20 +35,6 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
37
35
|
return {
|
|
38
36
|
...incomingConfig,
|
|
39
37
|
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
38
|
onInit: async (payload) => {
|
|
55
39
|
if (incomingConfig.onInit)
|
|
56
40
|
await incomingConfig.onInit(payload);
|
|
@@ -116,22 +100,10 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
116
100
|
createTestIntegrationTool({ ...deps, registry }),
|
|
117
101
|
createListIntegrationTypesTool({ registry }),
|
|
118
102
|
];
|
|
119
|
-
// Payload's own MCP plugin,
|
|
120
|
-
//
|
|
121
|
-
//
|
|
103
|
+
// Payload's own MCP plugin, and the only transport these tools have.
|
|
104
|
+
// `onInit` is both the earliest they can exist and still early enough
|
|
105
|
+
// that `mcpPlugin` reads the array populated.
|
|
122
106
|
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
107
|
Object.defineProperty(payload, REGISTRY_SYMBOL, {
|
|
136
108
|
value: registry,
|
|
137
109
|
enumerable: false,
|
|
@@ -151,12 +123,27 @@ export const integrationsPlugin = (rawOptions) => (incomingConfig) => {
|
|
|
151
123
|
});
|
|
152
124
|
logger.info('Integrations server ready', {
|
|
153
125
|
collectionSlug,
|
|
154
|
-
routePrefix,
|
|
155
126
|
integrationCount: registry.size,
|
|
156
127
|
});
|
|
157
128
|
},
|
|
158
129
|
};
|
|
159
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* The registry this plugin attached at init, if it did.
|
|
133
|
+
*
|
|
134
|
+
* `Fn` is the host's own Inngest function type. Naming it is what lets the host
|
|
135
|
+
* serve `createFunctions()` results without asserting them back — the registry
|
|
136
|
+
* stores integrations at `unknown` otherwise, and an `unknown[]` cannot be
|
|
137
|
+
* handed to `serve()`:
|
|
138
|
+
*
|
|
139
|
+
* ```ts
|
|
140
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* There is no checking behind it either way — the value comes off a symbol on
|
|
144
|
+
* the Payload instance. What the parameter buys is that the assertion happens
|
|
145
|
+
* once, here, in terms of the host's own types, rather than at every read.
|
|
146
|
+
*/
|
|
160
147
|
export function getIntegrationRegistry(payload) {
|
|
161
148
|
return payload[REGISTRY_SYMBOL];
|
|
162
149
|
}
|
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,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AM,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"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -3,12 +3,24 @@ import type { Integration } from './types.js';
|
|
|
3
3
|
* Tiny registry keyed by integration id. Construction is per-plugin-init
|
|
4
4
|
* (not a module-level singleton) so two Payload configs in the same process
|
|
5
5
|
* don't share state. Keeps duplicate-id detection synchronous and simple.
|
|
6
|
+
*
|
|
7
|
+
* Generic in the integrations' function type, and `unknown` by default, for the
|
|
8
|
+
* same reason `Integration` is: this package never touches what
|
|
9
|
+
* `createFunctions` returns, and the host that serves them should not have to
|
|
10
|
+
* assert its way back to its own type after putting them in here.
|
|
11
|
+
*
|
|
12
|
+
* A host names it once, where it reads the registry:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
16
|
+
* const functions = registry?.list().flatMap((i) => i.createFunctions(ctx)) ?? []
|
|
17
|
+
* ```
|
|
6
18
|
*/
|
|
7
|
-
export declare class IntegrationRegistry {
|
|
19
|
+
export declare class IntegrationRegistry<Fn = unknown> {
|
|
8
20
|
private readonly byId;
|
|
9
|
-
register(integration: Integration): void;
|
|
10
|
-
get(id: string): Integration | undefined;
|
|
11
|
-
list(): Integration[];
|
|
21
|
+
register(integration: Integration<Record<string, unknown>, Fn>): void;
|
|
22
|
+
get(id: string): Integration<Record<string, unknown>, Fn> | undefined;
|
|
23
|
+
list(): Integration<Record<string, unknown>, Fn>[];
|
|
12
24
|
has(id: string): boolean;
|
|
13
25
|
get size(): number;
|
|
14
26
|
}
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,mBAAmB,CAAC,EAAE,GAAG,OAAO;IAC3C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8D;IAEnF,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI;IAOrE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS;IAIrE,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE;IAIlD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
package/dist/registry.js
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
* Tiny registry keyed by integration id. Construction is per-plugin-init
|
|
3
3
|
* (not a module-level singleton) so two Payload configs in the same process
|
|
4
4
|
* don't share state. Keeps duplicate-id detection synchronous and simple.
|
|
5
|
+
*
|
|
6
|
+
* Generic in the integrations' function type, and `unknown` by default, for the
|
|
7
|
+
* same reason `Integration` is: this package never touches what
|
|
8
|
+
* `createFunctions` returns, and the host that serves them should not have to
|
|
9
|
+
* assert its way back to its own type after putting them in here.
|
|
10
|
+
*
|
|
11
|
+
* A host names it once, where it reads the registry:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const registry = getIntegrationRegistry<InngestFunction.Any>(payload)
|
|
15
|
+
* const functions = registry?.list().flatMap((i) => i.createFunctions(ctx)) ?? []
|
|
16
|
+
* ```
|
|
5
17
|
*/
|
|
6
18
|
export class IntegrationRegistry {
|
|
7
19
|
byId = new Map();
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,mBAAmB;IACb,IAAI,GAAG,IAAI,GAAG,EAAoD,CAAA;IAEnF,QAAQ,CAAC,WAAqD;QAC5D,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,gBAAgB,WAAW,CAAC,EAAE,yBAAyB,CAAC,CAAA;QAC1E,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,WAAW,CAAC,CAAA;IAC5C,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,IAAI;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IACvC,CAAC;IAED,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;CACF"}
|
package/dist/tools/access.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { McpToolContext } from '@forumone/throughline-plugin-contract';
|
|
2
2
|
export declare function isIntegrationsReader(ctx: McpToolContext): boolean;
|
|
3
3
|
export declare function isIntegrationsAdmin(ctx: McpToolContext): boolean;
|
|
4
|
-
export
|
|
5
|
-
error: string;
|
|
6
|
-
};
|
|
4
|
+
export { deniedEnvelope } from '@forumone/throughline-core';
|
|
7
5
|
//# sourceMappingURL=access.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAE3E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAIjE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAGhE;
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAE3E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAIjE;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAGhE;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/tools/access.js
CHANGED
|
@@ -9,7 +9,6 @@ export function isIntegrationsAdmin(ctx) {
|
|
|
9
9
|
return false;
|
|
10
10
|
return ctx.user.roles.includes('admin');
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
12
|
+
// `deniedEnvelope` lives in core: three servers had identical copies.
|
|
13
|
+
export { deniedEnvelope } from '@forumone/throughline-core';
|
|
15
14
|
//# sourceMappingURL=access.js.map
|
package/dist/tools/access.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAmB;IACtD,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAA;IAC5B,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAmB;IACrD,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAmB;IACtD,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAA;IAC5B,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAmB;IACrD,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAED,sEAAsE;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Field } from 'payload';
|
|
2
|
-
import type { Inngest
|
|
2
|
+
import type { Inngest } from 'inngest';
|
|
3
3
|
import type { McpToolDefinition } from '@forumone/throughline-plugin-contract';
|
|
4
4
|
export type IntegrationCategory = 'crm' | 'marketing' | 'analytics' | 'webhook' | 'storage' | 'messaging' | 'other';
|
|
5
5
|
export type IntegrationSyncStatus = 'success' | 'partial' | 'failed' | 'never-run';
|
|
@@ -23,7 +23,7 @@ export interface IntegrationHealth {
|
|
|
23
23
|
* {@link Integration.createFunctions} and emit their own results events as
|
|
24
24
|
* needed. They never call other integrations directly.
|
|
25
25
|
*/
|
|
26
|
-
export interface Integration<Config = Record<string, unknown
|
|
26
|
+
export interface Integration<Config = Record<string, unknown>, Fn = unknown> {
|
|
27
27
|
/** Unique slug. Used as the `integrationType` value in the collection. */
|
|
28
28
|
id: string;
|
|
29
29
|
/** Display name shown in the admin and `list_integration_types`. */
|
|
@@ -55,8 +55,24 @@ export interface Integration<Config = Record<string, unknown>> {
|
|
|
55
55
|
* during plugin init; the returned functions are exposed via the registry
|
|
56
56
|
* so the client app's Inngest endpoint can serve them. See
|
|
57
57
|
* `docs/integrations-wiring.md`.
|
|
58
|
+
*
|
|
59
|
+
* **Generic in the function type, and `unknown` by default, on purpose.**
|
|
60
|
+
* This plugin never inspects or invokes what comes back — the one use
|
|
61
|
+
* anywhere is `.length`, for a log line saying how many an integration
|
|
62
|
+
* contributed. The host serves them.
|
|
63
|
+
*
|
|
64
|
+
* Naming `InngestFunction.Any` here instead cost a consumer two casts. A host
|
|
65
|
+
* whose dependency graph resolves a different `inngest` instance — pnpm keys
|
|
66
|
+
* one by its peer set, and `inngest` has optional peers on `express`, `hono`
|
|
67
|
+
* and `next`, so installing anything that pulls one in is enough — got a type
|
|
68
|
+
* that is structurally identical and nominally different. Generic, the host's
|
|
69
|
+
* own `InngestFunction.Any` flows through and the question never arises:
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* export const myIntegration: Integration<MyConfig, InngestFunction.Any> = { … }
|
|
73
|
+
* ```
|
|
58
74
|
*/
|
|
59
|
-
createFunctions: (ctx: IntegrationContext) =>
|
|
75
|
+
createFunctions: (ctx: IntegrationContext) => Fn[];
|
|
60
76
|
/**
|
|
61
77
|
* Optional MCP tools the integration adds to the integrations server. Most
|
|
62
78
|
* integrations need only the five built-in tools; this is for cases where
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,WAAW,GACX,OAAO,CAAA;AAEX,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAA;AAElF,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO;IACzE,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAA;IACV,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB,4CAA4C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AC;IACzE,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAA;IACrB,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CAAA;IACnD,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forumone/throughline-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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.7.0",
|
|
46
|
+
"@forumone/throughline-plugin-contract": "0.4.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^20.17.0",
|