@forumone/throughline-core 0.7.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,97 @@
1
1
  # @forumone/throughline-core
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 957403b: One `@types/node`, so a host does not end up with two copies of `@payloadcms/ui`
8
+
9
+ Twelve packages asked for `@types/node@^20.17.0` and `design-system-payload`
10
+ asked for `^24.13.2`. Inside this repository that is untidy. Inside a host that
11
+ consumes the suite from source — which is how `forumone/forumone-2026` uses it,
12
+ as a git submodule in one pnpm workspace — it is a runtime failure.
13
+
14
+ pnpm hashes a package's identity with its resolved peers. `publishing` and
15
+ `integrations` both take `@payloadcms/ui` as a peer _and_ as a devDependency, so
16
+ each got its own copy resolved against `@types/node@20`, while the host's copy
17
+ resolved against `@types/node@24`. Same version, 3.87.1, two directories:
18
+
19
+ apps/web → @payloadcms+ui@3.87.1_…_9ce0de5c…
20
+ packages/publishing → @payloadcms+ui@3.87.1_…_13184ec4…
21
+ packages/integrations → @payloadcms+ui@3.87.1_…_13184ec4…
22
+
23
+ Two directories are two module instances. Two instances of `@payloadcms/ui` are
24
+ two `ConfigContext` objects, and `PublishButton` read the one the admin's
25
+ provider had never populated:
26
+
27
+ TypeError: Cannot destructure property 'config' of useConfig() as it is undefined
28
+
29
+ The host saw an intermittent 500 on every admin document view — `PublishButton`
30
+ is installed on each collection with a publish policy, so lists, `/admin` and
31
+ the login screen were all fine and only editing broke. Nothing caught it:
32
+ install, `--frozen-lockfile`, typecheck, lint and every test passed, because the
33
+ two copies are byte-identical and the split exists only at module resolution.
34
+ forumone/forumone-2026#498.
35
+
36
+ Aligning on `^24.13.2` collapses them to one instance. Nothing here targets a
37
+ Node 20 API deliberately; the packages typecheck and test unchanged against the
38
+ newer types.
39
+
40
+ `create-throughline` keeps `^20.17.0` on purpose. It is the one package
41
+ declaring `engines.node: >=20.9.0`, and typechecking a CLI against types newer
42
+ than the runtime it promises to support is how a Node 24-only call ships to
43
+ somebody on Node 20.
44
+
45
+ - Updated dependencies [957403b]
46
+ - @forumone/throughline-plugin-contract@0.4.1
47
+
48
+ ## 0.8.0
49
+
50
+ ### Minor Changes
51
+
52
+ - a9262da: Per-tool gating works, because tool names no longer wait for `onInit`
53
+
54
+ `@payloadcms/plugin-mcp` generates one per-key checkbox per tool while the host's
55
+ config is being built, and then gates every call on the checkbox matching the
56
+ tool's name. Every Throughline tool was built at `onInit` — each closes over
57
+ `payload`, the publishing service or the manifest loader — so the array it maps
58
+ over was empty, no checkboxes were generated, and its `?? false` denied all 27
59
+ tools to every key. A valid key got a 200 and an empty `tools/list`, with nothing
60
+ wrong on either side.
61
+
62
+ The plugin needs only `name` and `description` then, and neither needs a Payload.
63
+ So a server now **declares** its tools as the config is built and **binds** their
64
+ handlers at `onInit`:
65
+
66
+ ```ts
67
+ options.mcpTools?.declare(PUBLISHING_TOOL_DESCRIPTORS, { serverName: 'publishing' })
68
+ // …later, at onInit:
69
+ options.mcpTools?.add(tools, { serverName: 'publishing' })
70
+ ```
71
+
72
+ Each package gained a `tools/descriptors.ts` holding every tool's name and
73
+ description; the factories spread from it, so the checkbox and the MCP client
74
+ cannot describe a tool differently. A `descriptors.test.ts` in each package
75
+ asserts the two sets match, without needing a database.
76
+
77
+ `createMcpToolCollector` gains `declare()` and an `unbound` list. Both mismatches
78
+ are refused rather than absorbed: a tool built but never declared throws at
79
+ `onInit` (it would otherwise be denied to every key, silently), and a tool
80
+ declared but never bound stays advertised with a handler that explains itself.
81
+
82
+ **Order in the host's plugin array is now load-bearing.** Every tool-bearing
83
+ server must come before `mcpPlugin`, or it declares into an array that has
84
+ already been read. It was only a convention before; it is a requirement now, and
85
+ the failure mode — a server's tools missing from every key — is the one this
86
+ change exists to remove.
87
+
88
+ `requiredScope` stays declared and read by nothing. Enforcement is the checkbox;
89
+ these record which tools are consequential, and are the mapping a scope-aware
90
+ default would be built from.
91
+
92
+ The playground registers `mcpPlugin` for the first time, so the suite's only
93
+ end-to-end host now exercises the tools rather than just their composition.
94
+
3
95
  ## 0.7.0
4
96
 
5
97
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { AuditAction, AuditActor, AuditCollectionOptions, AuditEventInput,
3
3
  export { createInngestClient } from './events/index.js';
4
4
  export type { CoreEvents, FrameworkEvents, InngestClientOptions } from './events/index.js';
5
5
  export { McpMetaSchema, auditContext, deniedEnvelope, createMcpToolCollector, toPayloadMcpTool, toPayloadMcpTools, withMeta, } from './mcp/index.js';
6
- export type { AddToolsOptions, AuditContextFields, CreateMcpToolCollectorOptions, McpMeta, McpToolCollector, PayloadMcpRequest, PayloadMcpTool, ToPayloadMcpToolOptions, } from './mcp/index.js';
6
+ export type { AddToolsOptions, AuditContextFields, CreateMcpToolCollectorOptions, DeclareToolsOptions, McpMeta, McpToolCollector, McpToolDescriptor, PayloadMcpRequest, PayloadMcpTool, ToPayloadMcpToolOptions, } from './mcp/index.js';
7
7
  export { defaultLogger, createNamedLogger } from './logger/index.js';
8
8
  export { documentContentHash, formatZodIssues, sha256Hex, unwrapRelationshipId, } from './utils/index.js';
9
9
  export type { DocumentContentHashOptions } from './utils/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,GACf,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,WAAW,EACX,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE1F,OAAO,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,6BAA6B,EAC7B,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,GACxB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAIlE,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACpB,MAAM,uCAAuC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,GACf,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,WAAW,EACX,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE1F,OAAO,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,6BAA6B,EAC7B,mBAAmB,EACnB,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,GACxB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAIlE,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACpB,MAAM,uCAAuC,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4DAA4D;AAE5D,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,GACf,MAAM,kBAAkB,CAAA;AAYzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAGvD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AAYvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4DAA4D;AAE5D,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,GACf,MAAM,kBAAkB,CAAA;AAYzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAGvD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AAcvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEpE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,oBAAoB,GACrB,MAAM,kBAAkB,CAAA"}
@@ -1,18 +1,33 @@
1
1
  import type { McpToolDefinition } from '@forumone/throughline-plugin-contract';
2
2
  import { type PayloadMcpTool, type ToPayloadMcpToolOptions } from './payload-mcp.js';
3
+ /** What `plugin-mcp` needs about a tool while the config is being built. */
4
+ export interface McpToolDescriptor {
5
+ name: string;
6
+ description: string;
7
+ }
3
8
  export interface McpToolCollector {
4
9
  /**
5
- * The array to hand `mcpPlugin`. Empty until the plugins initialise, and the
6
- * same array afterwards do not copy or spread it at config time, or the
7
- * tools will be added to something nobody reads.
10
+ * The array to hand `mcpPlugin`. Filled by `declare` at config time and
11
+ * completed by `add` at `onInit` and the same array throughout, so do not
12
+ * copy or spread it, or the tools will be added to something nobody reads.
8
13
  */
9
14
  readonly tools: PayloadMcpTool[];
10
- /** Called by a plugin at `onInit`, once it can build its tools. */
15
+ /**
16
+ * Called by a plugin as the config is built, with its tools' names and
17
+ * descriptions. This is what `plugin-mcp` turns into per-key checkboxes.
18
+ */
19
+ declare(descriptors: readonly McpToolDescriptor[], options?: DeclareToolsOptions): void;
20
+ /** Called by a plugin at `onInit`, once it can build its handlers. */
11
21
  add(tools: McpToolDefinition[], options?: AddToolsOptions): void;
12
- /** Which servers have contributed, in the order they initialised. */
22
+ /** Which servers have declared, in the order they did. */
13
23
  readonly servers: string[];
24
+ /**
25
+ * Tools declared and never bound. Empty after every server's `onInit` has
26
+ * run; anything left is a server that declared a tool it does not build.
27
+ */
28
+ readonly unbound: string[];
14
29
  }
15
- export interface AddToolsOptions extends ToPayloadMcpToolOptions {
30
+ export interface DeclareToolsOptions {
16
31
  /**
17
32
  * Which server these came from — `'publishing'`, `'approvals'`. Used to name
18
33
  * both sides of a duplicate-name collision, which is the only thing that
@@ -20,6 +35,8 @@ export interface AddToolsOptions extends ToPayloadMcpToolOptions {
20
35
  */
21
36
  serverName?: string;
22
37
  }
38
+ export interface AddToolsOptions extends ToPayloadMcpToolOptions, DeclareToolsOptions {
39
+ }
23
40
  export type CreateMcpToolCollectorOptions = ToPayloadMcpToolOptions;
24
41
  /**
25
42
  * Somewhere for the plugins to put their tools, that the host can pass to
@@ -1 +1 @@
1
- {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/mcp/collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AA6BvG,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,EAAE,CAAA;IAChC,mEAAmE;IACnE,GAAG,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAChE,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,eAAgB,SAAQ,uBAAuB;IAC9D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,CAAA;AAEnE;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,CA2BlB"}
1
+ {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/mcp/collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AA4CvG,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,EAAE,CAAA;IAChC;;;OAGG;IACH,OAAO,CAAC,WAAW,EAAE,SAAS,iBAAiB,EAAE,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACvF,sEAAsE;IACtE,GAAG,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAChE,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;IAC1B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,uBAAuB,EAAE,mBAAmB;CAAG;AAExF,MAAM,MAAM,6BAA6B,GAAG,uBAAuB,CAAA;AAEnE;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,CA+ElB"}
@@ -11,24 +11,67 @@ import { toPayloadMcpTools } from './payload-mcp.js';
11
11
  export function createMcpToolCollector(options = {}) {
12
12
  const tools = [];
13
13
  const servers = [];
14
- const byName = new Map();
14
+ const declaredBy = new Map();
15
+ const slots = new Map();
16
+ const bound = new Set();
15
17
  return {
16
18
  tools,
17
19
  servers,
18
- add(incoming, addOptions = {}) {
19
- const { serverName = 'an unnamed server', ...toolOptions } = addOptions;
20
- for (const tool of incoming) {
21
- const existing = byName.get(tool.name);
20
+ get unbound() {
21
+ return [...declaredBy.keys()].filter(name => !bound.has(name));
22
+ },
23
+ declare(descriptors, declareOptions = {}) {
24
+ const { serverName = 'an unnamed server' } = declareOptions;
25
+ for (const descriptor of descriptors) {
26
+ const existing = declaredBy.get(descriptor.name);
22
27
  if (existing !== undefined) {
23
- throw new Error(`Two MCP tools are called "${tool.name}" — one from ${existing}, one from ` +
28
+ throw new Error(`Two MCP tools are called "${descriptor.name}" — one from ${existing}, one from ` +
24
29
  `${serverName}. Under a single MCP server a tool name is a namespace, and a client ` +
25
30
  `offered both gets whichever registered last. Rename one.`);
26
31
  }
27
- byName.set(tool.name, serverName);
32
+ declaredBy.set(descriptor.name, serverName);
33
+ /*
34
+ A slot, not a tool. `name` and `description` are everything the plugin
35
+ reads now; `parameters` and `handler` arrive at `onInit`, on this same
36
+ object, because the array identity is what the host handed over.
37
+ */
38
+ const slot = {
39
+ name: descriptor.name,
40
+ description: descriptor.description,
41
+ parameters: {},
42
+ handler: () => {
43
+ throw new Error(`MCP tool "${descriptor.name}" was declared by ${serverName} and never bound. ` +
44
+ `A server declares its tools as the config is built and binds their handlers at ` +
45
+ `onInit; this one did not reach the second step, so the tool is advertised and ` +
46
+ `cannot run.`);
47
+ },
48
+ };
49
+ slots.set(descriptor.name, slot);
50
+ tools.push(slot);
28
51
  }
29
- tools.push(...toPayloadMcpTools(incoming, { ...options, ...toolOptions }));
30
52
  servers.push(serverName);
31
53
  },
54
+ add(incoming, addOptions = {}) {
55
+ const { serverName = 'an unnamed server', ...toolOptions } = addOptions;
56
+ for (const tool of toPayloadMcpTools(incoming, { ...options, ...toolOptions })) {
57
+ const slot = slots.get(tool.name);
58
+ if (!slot) {
59
+ throw new Error(`${serverName} built an MCP tool called "${tool.name}" that it never declared. ` +
60
+ `Add it to that package's tool descriptors: a tool the collector does not know ` +
61
+ `about while the config is built gets no per-key checkbox, and \`plugin-mcp\` ` +
62
+ `then denies it to every key with no error anywhere.`);
63
+ }
64
+ /*
65
+ Mutated rather than replaced. `mcpPlugin` was handed this array at config
66
+ time and reads it per request; swapping the element would leave the
67
+ checkbox pointing at an object nobody serves.
68
+ */
69
+ slot.description = tool.description;
70
+ slot.parameters = tool.parameters;
71
+ slot.handler = tool.handler;
72
+ bound.add(tool.name);
73
+ }
74
+ },
32
75
  };
33
76
  }
34
77
  //# sourceMappingURL=collector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/mcp/collector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAqD,MAAM,kBAAkB,CAAA;AAqDvG;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAyC,EAAE;IAE3C,MAAM,KAAK,GAAqB,EAAE,CAAA;IAClC,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;IAExC,OAAO;QACL,KAAK;QACL,OAAO;QACP,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,EAAE;YAC3B,MAAM,EAAE,UAAU,GAAG,mBAAmB,EAAE,GAAG,WAAW,EAAE,GAAG,UAAU,CAAA;YAEvE,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;gBAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACtC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;oBAC3B,MAAM,IAAI,KAAK,CACb,6BAA6B,IAAI,CAAC,IAAI,gBAAgB,QAAQ,aAAa;wBACzE,GAAG,UAAU,uEAAuE;wBACpF,0DAA0D,CAC7D,CAAA;gBACH,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IA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AW,GAAG,IAAI,CAAC,WAAW,CAAA;gBACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;gBACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;gBAC3B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACtB,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -5,6 +5,6 @@ export type { AuditContextFields } from './audit-context.js';
5
5
  export { toPayloadMcpTool, toPayloadMcpTools } from './payload-mcp.js';
6
6
  export type { PayloadMcpRequest, PayloadMcpTool, ToPayloadMcpToolOptions, } from './payload-mcp.js';
7
7
  export { createMcpToolCollector } from './collector.js';
8
- export type { AddToolsOptions, CreateMcpToolCollectorOptions, McpToolCollector, } from './collector.js';
8
+ export type { AddToolsOptions, CreateMcpToolCollectorOptions, DeclareToolsOptions, McpToolCollector, McpToolDescriptor, } from './collector.js';
9
9
  export { deniedEnvelope } from './envelope.js';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACtE,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,GACxB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AACvD,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACtE,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,GACxB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AACvD,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAOtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAOvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAOtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AASvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forumone/throughline-core",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Core plumbing for Throughline: audit log, MCP authentication and handler, event taxonomy + Inngest client factory, logger, shared utilities.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -58,10 +58,10 @@
58
58
  "dependencies": {
59
59
  "zod": "^3.23.0",
60
60
  "zod-to-json-schema": "^3.25.2",
61
- "@forumone/throughline-plugin-contract": "0.4.0"
61
+ "@forumone/throughline-plugin-contract": "0.4.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@types/node": "^20.17.0",
64
+ "@types/node": "^24.13.2",
65
65
  "eslint": "^9.15.0",
66
66
  "inngest": "^4.2.0",
67
67
  "payload": "^3.83.0",