@forumone/throughline-core 0.7.0 → 0.8.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 CHANGED
@@ -1,5 +1,52 @@
1
1
  # @forumone/throughline-core
2
2
 
3
+ ## 0.8.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
+
3
50
  ## 0.7.0
4
51
 
5
52
  ### 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,C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;;;kBAIE;gBACF,IAAI,CAAC,WAAW,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.0",
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",