@vinkius-core/mcp-fusion 2.5.0 → 2.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.
Files changed (77) hide show
  1. package/dist/client/FusionClient.d.ts +122 -1
  2. package/dist/client/FusionClient.d.ts.map +1 -1
  3. package/dist/client/FusionClient.js +173 -11
  4. package/dist/client/FusionClient.js.map +1 -1
  5. package/dist/client/index.d.ts +2 -2
  6. package/dist/client/index.d.ts.map +1 -1
  7. package/dist/client/index.js +1 -1
  8. package/dist/client/index.js.map +1 -1
  9. package/dist/core/StandardSchema.d.ts +178 -0
  10. package/dist/core/StandardSchema.d.ts.map +1 -0
  11. package/dist/core/StandardSchema.js +166 -0
  12. package/dist/core/StandardSchema.js.map +1 -0
  13. package/dist/core/createGroup.d.ts +140 -0
  14. package/dist/core/createGroup.d.ts.map +1 -0
  15. package/dist/core/createGroup.js +133 -0
  16. package/dist/core/createGroup.js.map +1 -0
  17. package/dist/core/execution/ExecutionPipeline.d.ts.map +1 -1
  18. package/dist/core/execution/ExecutionPipeline.js +6 -2
  19. package/dist/core/execution/ExecutionPipeline.js.map +1 -1
  20. package/dist/core/index.d.ts +7 -1
  21. package/dist/core/index.d.ts.map +1 -1
  22. package/dist/core/index.js +6 -0
  23. package/dist/core/index.js.map +1 -1
  24. package/dist/core/initFusion.d.ts +201 -0
  25. package/dist/core/initFusion.d.ts.map +1 -0
  26. package/dist/core/initFusion.js +134 -0
  27. package/dist/core/initFusion.js.map +1 -0
  28. package/dist/core/response.d.ts +49 -2
  29. package/dist/core/response.d.ts.map +1 -1
  30. package/dist/core/response.js +27 -5
  31. package/dist/core/response.js.map +1 -1
  32. package/dist/index.d.ts +16 -8
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +8 -4
  35. package/dist/index.js.map +1 -1
  36. package/dist/presenter/ZodDescriptionExtractor.d.ts +54 -0
  37. package/dist/presenter/ZodDescriptionExtractor.d.ts.map +1 -0
  38. package/dist/presenter/ZodDescriptionExtractor.js +131 -0
  39. package/dist/presenter/ZodDescriptionExtractor.js.map +1 -0
  40. package/dist/presenter/definePresenter.d.ts +172 -0
  41. package/dist/presenter/definePresenter.d.ts.map +1 -0
  42. package/dist/presenter/definePresenter.js +96 -0
  43. package/dist/presenter/definePresenter.js.map +1 -0
  44. package/dist/presenter/index.d.ts +3 -0
  45. package/dist/presenter/index.d.ts.map +1 -1
  46. package/dist/presenter/index.js +4 -0
  47. package/dist/presenter/index.js.map +1 -1
  48. package/dist/server/DevServer.d.ts +96 -0
  49. package/dist/server/DevServer.d.ts.map +1 -0
  50. package/dist/server/DevServer.js +187 -0
  51. package/dist/server/DevServer.js.map +1 -0
  52. package/dist/server/autoDiscover.d.ts +63 -0
  53. package/dist/server/autoDiscover.d.ts.map +1 -0
  54. package/dist/server/autoDiscover.js +157 -0
  55. package/dist/server/autoDiscover.js.map +1 -0
  56. package/dist/server/index.d.ts +4 -0
  57. package/dist/server/index.d.ts.map +1 -1
  58. package/dist/server/index.js +4 -0
  59. package/dist/server/index.js.map +1 -1
  60. package/dist/state-sync/PolicyValidator.d.ts +36 -0
  61. package/dist/state-sync/PolicyValidator.d.ts.map +1 -1
  62. package/dist/state-sync/PolicyValidator.js +35 -0
  63. package/dist/state-sync/PolicyValidator.js.map +1 -1
  64. package/dist/state-sync/ResponseDecorator.d.ts.map +1 -1
  65. package/dist/state-sync/ResponseDecorator.js +2 -1
  66. package/dist/state-sync/ResponseDecorator.js.map +1 -1
  67. package/dist/state-sync/StateSyncLayer.d.ts +5 -4
  68. package/dist/state-sync/StateSyncLayer.d.ts.map +1 -1
  69. package/dist/state-sync/StateSyncLayer.js +35 -4
  70. package/dist/state-sync/StateSyncLayer.js.map +1 -1
  71. package/dist/state-sync/index.d.ts +3 -1
  72. package/dist/state-sync/index.d.ts.map +1 -1
  73. package/dist/state-sync/index.js +1 -0
  74. package/dist/state-sync/index.js.map +1 -1
  75. package/dist/state-sync/types.d.ts +62 -0
  76. package/dist/state-sync/types.d.ts.map +1 -1
  77. package/package.json +39 -2
@@ -0,0 +1,54 @@
1
+ /**
2
+ * ZodDescriptionExtractor — Automatic Prompt Extraction from Zod .describe()
3
+ *
4
+ * Walks a Zod schema's AST and collects `.describe()` annotations from
5
+ * every field. These descriptions are injected as system rules via
6
+ * Context Tree-Shaking, eliminating the need for manual `systemRules`
7
+ * when the Zod schema already carries domain-specific constraints.
8
+ *
9
+ * This ensures documentation never drifts from the actual data shape:
10
+ * the single source of truth is the Zod `.describe()` annotation.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const schema = z.object({
15
+ * amount_cents: z.number().describe('CRITICAL: in CENTS. Divide by 100.'),
16
+ * status: z.enum(['paid', 'pending']).describe('Always display with emoji'),
17
+ * });
18
+ *
19
+ * extractZodDescriptions(schema);
20
+ * // → ['amount_cents: CRITICAL: in CENTS. Divide by 100.',
21
+ * // 'status: Always display with emoji']
22
+ * ```
23
+ *
24
+ * @module
25
+ */
26
+ import { type ZodType } from 'zod';
27
+ /**
28
+ * Extract `.describe()` annotations from a Zod schema's fields.
29
+ *
30
+ * Walks the top-level `z.object()` shape and retrieves the description
31
+ * string from each field (after unwrapping wrappers like `z.optional()`,
32
+ * `z.nullable()`, `z.default()`, etc.).
33
+ *
34
+ * Returns an array of human-readable `"fieldName: description"` strings,
35
+ * ready to be injected as system rules.
36
+ *
37
+ * @param schema - A Zod schema (typically z.object, but safely handles non-objects)
38
+ * @returns Array of `"fieldName: description"` strings (empty if no descriptions found)
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const schema = z.object({
43
+ * amount_cents: z.number().describe('CRITICAL: value is in CENTS. Divide by 100.'),
44
+ * currency: z.string(), // No .describe() → skipped
45
+ * status: z.enum(['paid', 'pending']).describe('Show with emoji'),
46
+ * });
47
+ *
48
+ * extractZodDescriptions(schema);
49
+ * // → ['amount_cents: CRITICAL: value is in CENTS. Divide by 100.',
50
+ * // 'status: Show with emoji']
51
+ * ```
52
+ */
53
+ export declare function extractZodDescriptions(schema: ZodType): string[];
54
+ //# sourceMappingURL=ZodDescriptionExtractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZodDescriptionExtractor.d.ts","sourceRoot":"","sources":["../../src/presenter/ZodDescriptionExtractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAqEnC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAehE"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * ZodDescriptionExtractor — Automatic Prompt Extraction from Zod .describe()
3
+ *
4
+ * Walks a Zod schema's AST and collects `.describe()` annotations from
5
+ * every field. These descriptions are injected as system rules via
6
+ * Context Tree-Shaking, eliminating the need for manual `systemRules`
7
+ * when the Zod schema already carries domain-specific constraints.
8
+ *
9
+ * This ensures documentation never drifts from the actual data shape:
10
+ * the single source of truth is the Zod `.describe()` annotation.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const schema = z.object({
15
+ * amount_cents: z.number().describe('CRITICAL: in CENTS. Divide by 100.'),
16
+ * status: z.enum(['paid', 'pending']).describe('Always display with emoji'),
17
+ * });
18
+ *
19
+ * extractZodDescriptions(schema);
20
+ * // → ['amount_cents: CRITICAL: in CENTS. Divide by 100.',
21
+ * // 'status: Always display with emoji']
22
+ * ```
23
+ *
24
+ * @module
25
+ */
26
+ import {} from 'zod';
27
+ // ── Extraction Logic ─────────────────────────────────────
28
+ /**
29
+ * Recursively unwrap wrapper Zod nodes (optional, nullable, default, branded,
30
+ * readonly, effects, lazy, catches, pipes) to reach the inner schema.
31
+ * @internal
32
+ */
33
+ function unwrap(node) {
34
+ const def = node._def;
35
+ if (!def)
36
+ return node;
37
+ const typeName = def.typeName ?? '';
38
+ const wrapperTypes = [
39
+ 'ZodOptional', 'ZodNullable', 'ZodDefault', 'ZodBranded',
40
+ 'ZodReadonly', 'ZodEffects', 'ZodLazy', 'ZodCatch', 'ZodPipeline',
41
+ ];
42
+ if (wrapperTypes.includes(typeName)) {
43
+ const inner = def.innerType ?? def.type ?? def.schema;
44
+ if (inner)
45
+ return unwrap(inner);
46
+ }
47
+ return node;
48
+ }
49
+ /**
50
+ * Get the shape record from a Zod object node.
51
+ * Supports both v3 (`_def.shape()`) and v4 (`_def.shape`) patterns.
52
+ * @internal
53
+ */
54
+ function getShape(node) {
55
+ const def = node._def;
56
+ if (!def)
57
+ return undefined;
58
+ if (typeof def.shape === 'function') {
59
+ return def.shape();
60
+ }
61
+ if (typeof def.shape === 'object' && def.shape !== null) {
62
+ return def.shape;
63
+ }
64
+ return undefined;
65
+ }
66
+ /**
67
+ * Extract `.describe()` annotations from a Zod schema's fields.
68
+ *
69
+ * Walks the top-level `z.object()` shape and retrieves the description
70
+ * string from each field (after unwrapping wrappers like `z.optional()`,
71
+ * `z.nullable()`, `z.default()`, etc.).
72
+ *
73
+ * Returns an array of human-readable `"fieldName: description"` strings,
74
+ * ready to be injected as system rules.
75
+ *
76
+ * @param schema - A Zod schema (typically z.object, but safely handles non-objects)
77
+ * @returns Array of `"fieldName: description"` strings (empty if no descriptions found)
78
+ *
79
+ * @example
80
+ * ```typescript
81
+ * const schema = z.object({
82
+ * amount_cents: z.number().describe('CRITICAL: value is in CENTS. Divide by 100.'),
83
+ * currency: z.string(), // No .describe() → skipped
84
+ * status: z.enum(['paid', 'pending']).describe('Show with emoji'),
85
+ * });
86
+ *
87
+ * extractZodDescriptions(schema);
88
+ * // → ['amount_cents: CRITICAL: value is in CENTS. Divide by 100.',
89
+ * // 'status: Show with emoji']
90
+ * ```
91
+ */
92
+ export function extractZodDescriptions(schema) {
93
+ const node = schema;
94
+ const shape = getShape(node);
95
+ if (!shape)
96
+ return [];
97
+ const descriptions = [];
98
+ for (const [key, fieldNode] of Object.entries(shape)) {
99
+ const desc = resolveDescription(fieldNode);
100
+ if (desc) {
101
+ descriptions.push(`${key}: ${desc}`);
102
+ }
103
+ }
104
+ return descriptions;
105
+ }
106
+ /**
107
+ * Resolve the description from a field node by unwrapping wrappers.
108
+ *
109
+ * Priority:
110
+ * 1. Outermost `.description` (Zod v4 style)
111
+ * 2. `_def.description` (Zod v3 style)
112
+ * 3. Unwrapped inner node's description
113
+ * @internal
114
+ */
115
+ function resolveDescription(node) {
116
+ // Check outermost description first
117
+ if (node.description)
118
+ return node.description;
119
+ if (node._def?.description)
120
+ return node._def.description;
121
+ // Unwrap and check inner
122
+ const inner = unwrap(node);
123
+ if (inner !== node) {
124
+ if (inner.description)
125
+ return inner.description;
126
+ if (inner._def?.description)
127
+ return inner._def.description;
128
+ }
129
+ return undefined;
130
+ }
131
+ //# sourceMappingURL=ZodDescriptionExtractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZodDescriptionExtractor.js","sourceRoot":"","sources":["../../src/presenter/ZodDescriptionExtractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAgB,MAAM,KAAK,CAAC;AAwBnC,4DAA4D;AAE5D;;;;GAIG;AACH,SAAS,MAAM,CAAC,IAAa;IACzB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAEtB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;IACpC,MAAM,YAAY,GAAG;QACjB,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY;QACxD,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa;KACpE,CAAC;IAEF,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,CAA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AAI,CAAC,WAAW,CAAC;IAC9C,IAAI,IAAI,CAAC,IAAI,EAAE,WAAW;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;IAEzD,yBAAyB;IACzB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACjB,IAAI,KAAK,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC,WAAW,CAAC;QAChD,IAAI,KAAK,CAAC,IAAI,EAAE,WAAW;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;IAC/D,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * definePresenter() — Declarative Presenter Definition
3
+ *
4
+ * Zero-friction object-config API for creating Presenters.
5
+ * Replaces the fluent builder pattern with a single object literal
6
+ * that enables instant Ctrl+Space autocomplete and zero generic noise.
7
+ *
8
+ * The `schema` field drives type inference: the `ui`, `rules`, and
9
+ * `suggestActions` callbacks automatically receive the inferred type,
10
+ * so the developer never writes a generic parameter manually.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * import { definePresenter, ui } from '@vinkius-core/mcp-fusion';
15
+ * import { z } from 'zod';
16
+ *
17
+ * export const InvoicePresenter = definePresenter({
18
+ * name: 'Invoice',
19
+ * schema: z.object({
20
+ * id: z.string(),
21
+ * amount_cents: z.number().describe('CRITICAL: in CENTS. Divide by 100.'),
22
+ * status: z.enum(['paid', 'pending']),
23
+ * }),
24
+ * rules: ['CRITICAL: Divide amount_cents by 100 before displaying.'],
25
+ * ui: (inv) => [ui.echarts({ series: [{ type: 'gauge', data: [{ value: inv.amount_cents / 100 }] }] })],
26
+ * suggestActions: (inv) =>
27
+ * inv.status === 'pending'
28
+ * ? [{ tool: 'billing.pay', reason: 'Offer immediate payment' }]
29
+ * : [],
30
+ * });
31
+ * ```
32
+ *
33
+ * @module
34
+ */
35
+ import { type ZodType } from 'zod';
36
+ import { Presenter, type ActionSuggestion } from './Presenter.js';
37
+ import { type UiBlock } from './ui.js';
38
+ /**
39
+ * Agent limit configuration for cognitive guardrails.
40
+ */
41
+ export interface AgentLimitDef {
42
+ /** Maximum items to keep when data is an array */
43
+ readonly max: number;
44
+ /** Callback that produces a warning block when items are truncated */
45
+ readonly onTruncate: (omittedCount: number) => UiBlock;
46
+ }
47
+ /**
48
+ * Embedded child Presenter definition for relational composition.
49
+ */
50
+ export interface EmbedDef {
51
+ /** Property key in the parent data that contains the nested data */
52
+ readonly key: string;
53
+ /** The child Presenter to apply to the nested data */
54
+ readonly presenter: Presenter<unknown>;
55
+ }
56
+ /**
57
+ * Full declarative configuration for `definePresenter()`.
58
+ *
59
+ * @typeParam T - Inferred from the `schema` field's output type
60
+ */
61
+ export interface PresenterConfig<T> {
62
+ /** Human-readable domain name (for debugging and introspection) */
63
+ readonly name: string;
64
+ /** Zod schema for data validation and field filtering */
65
+ readonly schema?: ZodType<T>;
66
+ /**
67
+ * System rules that travel with the data.
68
+ *
69
+ * - **Static**: `string[]` — always injected
70
+ * - **Dynamic**: `(data, ctx?) => (string | null)[]` — context-aware (RBAC, DLP, locale)
71
+ *
72
+ * Return `null` from dynamic rules to conditionally exclude them.
73
+ */
74
+ readonly rules?: readonly string[] | ((data: T, ctx?: unknown) => (string | null)[]);
75
+ /**
76
+ * UI blocks for a **single data item**.
77
+ *
78
+ * Return `null` for conditional blocks (filtered automatically).
79
+ */
80
+ readonly ui?: (item: T, ctx?: unknown) => (UiBlock | null)[];
81
+ /**
82
+ * Aggregated UI blocks for a **collection** (array) of items.
83
+ *
84
+ * Called once with the entire validated array. Prevents N individual
85
+ * charts from flooding the LLM's context.
86
+ */
87
+ readonly collectionUi?: (items: T[], ctx?: unknown) => (UiBlock | null)[];
88
+ /**
89
+ * Cognitive guardrail that truncates large collections.
90
+ *
91
+ * Protects against context DDoS by limiting returned array length
92
+ * and injecting a summary block.
93
+ */
94
+ readonly agentLimit?: AgentLimitDef;
95
+ /**
96
+ * HATEOAS-style next-action suggestions based on data state.
97
+ *
98
+ * Eliminates routing hallucinations by providing explicit next-step hints.
99
+ */
100
+ readonly suggestActions?: (data: T, ctx?: unknown) => ActionSuggestion[];
101
+ /**
102
+ * Embedded child Presenters for nested relational data.
103
+ *
104
+ * Define once, embed everywhere. Each embed's `key` is looked up on
105
+ * the parent data, and the child Presenter renders its own blocks/rules.
106
+ */
107
+ readonly embeds?: readonly EmbedDef[];
108
+ /**
109
+ * Automatically extract `.describe()` annotations from the Zod schema
110
+ * and merge them with `rules` as system rules.
111
+ *
112
+ * When `true` (the default), field-level `.describe()` annotations
113
+ * become system rules, ensuring documentation never drifts from the
114
+ * actual data shape. Set to `false` to opt out.
115
+ *
116
+ * @default true
117
+ */
118
+ readonly autoRules?: boolean;
119
+ }
120
+ /**
121
+ * Define a domain-level Presenter using a declarative config object.
122
+ *
123
+ * This is the recommended, zero-friction API. The `schema` field drives
124
+ * full type inference — `ui`, `rules`, and `suggestActions` callbacks
125
+ * all receive correctly-typed parameters without any explicit generics.
126
+ *
127
+ * @typeParam TSchema - Zod type (inferred from the `schema` field)
128
+ * @param config - Declarative presenter configuration
129
+ * @returns A fully-configured {@link Presenter} ready for use
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * // Minimal
134
+ * const TaskPresenter = definePresenter({
135
+ * name: 'Task',
136
+ * schema: z.object({ id: z.string(), title: z.string(), done: z.boolean() }),
137
+ * rules: ['Use ✅ for done, 🔄 for in-progress.'],
138
+ * ui: (task) => [ui.markdown(`**${task.title}**: ${task.done ? '✅' : '🔄'}`)],
139
+ * });
140
+ *
141
+ * // With embeds, agent limit, and dynamic rules
142
+ * const OrderPresenter = definePresenter({
143
+ * name: 'Order',
144
+ * schema: orderSchema,
145
+ * rules: (order, ctx) => [
146
+ * ctx?.locale === 'pt-BR' ? 'Formate datas em DD/MM/YYYY' : null,
147
+ * ],
148
+ * agentLimit: { max: 100, onTruncate: (n) => ui.summary(`⚠️ ${n} orders hidden`) },
149
+ * embeds: [{ key: 'customer', presenter: CustomerPresenter }],
150
+ * suggestActions: (order) =>
151
+ * order.status === 'pending'
152
+ * ? [{ tool: 'orders.approve', reason: 'Ready for approval' }]
153
+ * : [],
154
+ * });
155
+ * ```
156
+ *
157
+ * @see {@link createPresenter} for the legacy fluent builder API
158
+ * @see {@link Presenter} for the full Presenter class documentation
159
+ */
160
+ export declare function definePresenter<TSchema extends ZodType>(config: PresenterConfig<TSchema['_output']> & {
161
+ schema: TSchema;
162
+ }): Presenter<TSchema['_output']>;
163
+ /**
164
+ * Define a Presenter without a schema (untyped data passthrough).
165
+ *
166
+ * @param config - Configuration without a schema field
167
+ * @returns A Presenter that passes data through without validation
168
+ */
169
+ export declare function definePresenter(config: PresenterConfig<unknown> & {
170
+ schema?: undefined;
171
+ }): Presenter<unknown>;
172
+ //# sourceMappingURL=definePresenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definePresenter.d.ts","sourceRoot":"","sources":["../../src/presenter/definePresenter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAKvC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1D;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC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,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAClE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,eAAe,CAC3B,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,GAC1D,SAAS,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * definePresenter() — Declarative Presenter Definition
3
+ *
4
+ * Zero-friction object-config API for creating Presenters.
5
+ * Replaces the fluent builder pattern with a single object literal
6
+ * that enables instant Ctrl+Space autocomplete and zero generic noise.
7
+ *
8
+ * The `schema` field drives type inference: the `ui`, `rules`, and
9
+ * `suggestActions` callbacks automatically receive the inferred type,
10
+ * so the developer never writes a generic parameter manually.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * import { definePresenter, ui } from '@vinkius-core/mcp-fusion';
15
+ * import { z } from 'zod';
16
+ *
17
+ * export const InvoicePresenter = definePresenter({
18
+ * name: 'Invoice',
19
+ * schema: z.object({
20
+ * id: z.string(),
21
+ * amount_cents: z.number().describe('CRITICAL: in CENTS. Divide by 100.'),
22
+ * status: z.enum(['paid', 'pending']),
23
+ * }),
24
+ * rules: ['CRITICAL: Divide amount_cents by 100 before displaying.'],
25
+ * ui: (inv) => [ui.echarts({ series: [{ type: 'gauge', data: [{ value: inv.amount_cents / 100 }] }] })],
26
+ * suggestActions: (inv) =>
27
+ * inv.status === 'pending'
28
+ * ? [{ tool: 'billing.pay', reason: 'Offer immediate payment' }]
29
+ * : [],
30
+ * });
31
+ * ```
32
+ *
33
+ * @module
34
+ */
35
+ import {} from 'zod';
36
+ import { Presenter } from './Presenter.js';
37
+ import {} from './ui.js';
38
+ import { extractZodDescriptions } from './ZodDescriptionExtractor.js';
39
+ /**
40
+ * Implementation
41
+ * @internal
42
+ */
43
+ export function definePresenter(config) {
44
+ const presenter = new Presenter(config.name);
45
+ if (config.schema) {
46
+ presenter.schema(config.schema);
47
+ }
48
+ // ── Zod-Driven Prompts: auto-extract .describe() annotations ──
49
+ const autoRules = config.autoRules !== false; // default: true
50
+ const zodDescriptions = (autoRules && config.schema)
51
+ ? extractZodDescriptions(config.schema)
52
+ : [];
53
+ if (config.rules) {
54
+ if (typeof config.rules === 'function') {
55
+ // Dynamic rules — wrap to prepend Zod descriptions
56
+ if (zodDescriptions.length > 0) {
57
+ const dynamicFn = config.rules;
58
+ presenter.systemRules((data, ctx) => [
59
+ ...zodDescriptions,
60
+ ...dynamicFn(data, ctx),
61
+ ]);
62
+ }
63
+ else {
64
+ presenter.systemRules(config.rules);
65
+ }
66
+ }
67
+ else {
68
+ // Static rules — merge with Zod descriptions
69
+ const merged = [...zodDescriptions, ...config.rules];
70
+ presenter.systemRules(merged);
71
+ }
72
+ }
73
+ else if (zodDescriptions.length > 0) {
74
+ // No explicit rules — use Zod descriptions alone
75
+ presenter.systemRules(zodDescriptions);
76
+ }
77
+ if (config.ui) {
78
+ presenter.uiBlocks(config.ui);
79
+ }
80
+ if (config.collectionUi) {
81
+ presenter.collectionUiBlocks(config.collectionUi);
82
+ }
83
+ if (config.agentLimit) {
84
+ presenter.agentLimit(config.agentLimit.max, config.agentLimit.onTruncate);
85
+ }
86
+ if (config.suggestActions) {
87
+ presenter.suggestActions(config.suggestActions);
88
+ }
89
+ if (config.embeds) {
90
+ for (const embed of config.embeds) {
91
+ presenter.embed(embed.key, embed.presenter);
92
+ }
93
+ }
94
+ return presenter;
95
+ }
96
+ //# sourceMappingURL=definePresenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definePresenter.js","sourceRoot":"","sources":["../../src/presenter/definePresenter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAgB,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,SAAS,EAAyB,MAAM,gBAAgB,CAAC;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,CAAC;IACL,CAAC;SAAM,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,iDAAiD;QACjD,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;QACZ,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACtB,SAAS,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACpB,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAChB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAChC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -8,6 +8,9 @@ export type { ActionSuggestion } from './ResponseBuilder.js';
8
8
  export { ui } from './ui.js';
9
9
  export type { UiBlock } from './ui.js';
10
10
  export { Presenter, createPresenter, isPresenter } from './Presenter.js';
11
+ export { definePresenter } from './definePresenter.js';
12
+ export type { PresenterConfig, AgentLimitDef, EmbedDef } from './definePresenter.js';
13
+ export { extractZodDescriptions } from './ZodDescriptionExtractor.js';
11
14
  export { PresenterValidationError } from './PresenterValidationError.js';
12
15
  export { postProcessResult, isToolResponse } from './PostProcessor.js';
13
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presenter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpF,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presenter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpF,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -9,6 +9,10 @@ export { ResponseBuilder, response, isResponseBuilder } from './ResponseBuilder.
9
9
  export { ui } from './ui.js';
10
10
  // ── Presenter ────────────────────────────────────────────
11
11
  export { Presenter, createPresenter, isPresenter } from './Presenter.js';
12
+ // ── Declarative Presenter ────────────────────────────────
13
+ export { definePresenter } from './definePresenter.js';
14
+ // ── Zod Description Extraction ───────────────────────────
15
+ export { extractZodDescriptions } from './ZodDescriptionExtractor.js';
12
16
  // ── Validation Error ─────────────────────────────────────
13
17
  export { PresenterValidationError } from './PresenterValidationError.js';
14
18
  // ── Post-Processing ──────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/presenter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,4DAA4D;AAC5D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGpF,4DAA4D;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAG7B,4DAA4D;AAC5D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzE,4DAA4D;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,4DAA4D;AAC5D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/presenter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,4DAA4D;AAC5D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGpF,4DAA4D;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAG7B,4DAA4D;AAC5D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzE,4DAA4D;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,4DAA4D;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,4DAA4D;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,4DAA4D;AAC5D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,96 @@
1
+ /** Duck-typed MCP server that supports notifications */
2
+ interface McpServerLike {
3
+ notification(notification: {
4
+ method: string;
5
+ }): Promise<void>;
6
+ sendNotification?(notification: {
7
+ method: string;
8
+ }): Promise<void>;
9
+ }
10
+ /** Duck-typed ToolRegistry */
11
+ interface ToolRegistryLike {
12
+ register(builder: unknown): void;
13
+ getBuilders?(): unknown[];
14
+ }
15
+ /**
16
+ * Configuration for the development server.
17
+ */
18
+ export interface DevServerConfig {
19
+ /**
20
+ * Directory to watch for file changes.
21
+ * Relative paths are resolved from the current working directory.
22
+ */
23
+ readonly dir: string;
24
+ /**
25
+ * File extension filter for watched files.
26
+ * @default ['.ts', '.js', '.mjs', '.mts']
27
+ */
28
+ readonly extensions?: string[];
29
+ /**
30
+ * Debounce interval in milliseconds.
31
+ * Prevents rapid-fire reloads when editors save multiple files.
32
+ * @default 300
33
+ */
34
+ readonly debounce?: number;
35
+ /**
36
+ * Setup callback invoked on every reload.
37
+ *
38
+ * Receives a fresh ToolRegistry. The callback should:
39
+ * 1. Import/define all tools
40
+ * 2. Register them on the registry
41
+ *
42
+ * This is called on initial startup and on every file change.
43
+ */
44
+ readonly setup: (registry: ToolRegistryLike) => void | Promise<void>;
45
+ /**
46
+ * Optional callback when a reload occurs.
47
+ * Useful for logging or triggering downstream updates.
48
+ */
49
+ readonly onReload?: (changedFile: string) => void;
50
+ /**
51
+ * Optional MCP server reference for sending tool list change notifications.
52
+ * When provided, the dev server sends `notifications/tools/list_changed`
53
+ * on every reload, so the LLM client picks up changes automatically.
54
+ */
55
+ readonly server?: McpServerLike;
56
+ }
57
+ /**
58
+ * Interface for a running dev server instance.
59
+ */
60
+ export interface DevServer {
61
+ /** Start watching and perform initial load */
62
+ start(): Promise<void>;
63
+ /** Stop the watcher and clean up */
64
+ stop(): void;
65
+ /** Force a manual reload (useful from CLI) */
66
+ reload(reason?: string): Promise<void>;
67
+ }
68
+ /**
69
+ * Create an HMR-enabled MCP development server.
70
+ *
71
+ * Watches a directory for file changes and automatically reloads
72
+ * tools, then notifies the connected MCP client via the native
73
+ * `notifications/tools/list_changed` notification.
74
+ *
75
+ * @param config - Dev server configuration
76
+ * @returns A {@link DevServer} instance with start/stop/reload controls
77
+ *
78
+ * @example
79
+ * ```typescript
80
+ * import { createDevServer, autoDiscover, ToolRegistry } from '@vinkius-core/mcp-fusion';
81
+ *
82
+ * const devServer = createDevServer({
83
+ * dir: './src/tools',
84
+ * setup: async (registry) => {
85
+ * await autoDiscover(registry, './src/tools');
86
+ * },
87
+ * onReload: (file) => console.log(`[HMR] Reloaded: ${file}`),
88
+ * });
89
+ *
90
+ * await devServer.start();
91
+ * // File changes → auto-reload → LLM client gets notification
92
+ * ```
93
+ */
94
+ export declare function createDevServer(config: DevServerConfig): DevServer;
95
+ export {};
96
+ //# sourceMappingURL=DevServer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/server/DevServer.ts"],"names":[],"mappings":"AAkDA,wDAAwD;AACxD,UAAU,aAAa;IACnB,YAAY,CAAC,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,gBAAgB,CAAC,CAAC,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtE;AAED,8BAA8B;AAC9B,UAAU,gBAAgB;IACtB,QAAQ,CAAC,O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