@hiveforge/hivemind-mcp 2.3.0 → 2.5.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/README.md +169 -27
- package/dist/cli.js +938 -77
- package/dist/cli.js.map +1 -1
- package/dist/config/schema.d.ts +125 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +79 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/graph/builder.d.ts +7 -3
- package/dist/graph/builder.d.ts.map +1 -1
- package/dist/graph/builder.js +51 -21
- package/dist/graph/builder.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/tool-generator.d.ts +3 -1
- package/dist/mcp/tool-generator.d.ts.map +1 -1
- package/dist/mcp/tool-generator.js +41 -5
- package/dist/mcp/tool-generator.js.map +1 -1
- package/dist/search/engine.d.ts +9 -1
- package/dist/search/engine.d.ts.map +1 -1
- package/dist/search/engine.js +16 -4
- package/dist/search/engine.js.map +1 -1
- package/dist/templates/builtin/people-management.d.ts +18 -0
- package/dist/templates/builtin/people-management.d.ts.map +1 -0
- package/dist/templates/builtin/people-management.js +533 -0
- package/dist/templates/builtin/people-management.js.map +1 -0
- package/dist/templates/builtin/research.d.ts +18 -0
- package/dist/templates/builtin/research.d.ts.map +1 -0
- package/dist/templates/builtin/research.js +359 -0
- package/dist/templates/builtin/research.js.map +1 -0
- package/dist/templates/builtin/worldbuilding.d.ts.map +1 -1
- package/dist/templates/builtin/worldbuilding.js +148 -0
- package/dist/templates/builtin/worldbuilding.js.map +1 -1
- package/dist/templates/community/architecture.d.ts +19 -0
- package/dist/templates/community/architecture.d.ts.map +1 -0
- package/dist/templates/community/architecture.js +296 -0
- package/dist/templates/community/architecture.js.map +1 -0
- package/dist/templates/community/index.d.ts +37 -0
- package/dist/templates/community/index.d.ts.map +1 -0
- package/dist/templates/community/index.js +45 -0
- package/dist/templates/community/index.js.map +1 -0
- package/dist/templates/community/ux-research.d.ts +21 -0
- package/dist/templates/community/ux-research.d.ts.map +1 -0
- package/dist/templates/community/ux-research.js +347 -0
- package/dist/templates/community/ux-research.js.map +1 -0
- package/dist/templates/loader.d.ts +65 -8
- package/dist/templates/loader.d.ts.map +1 -1
- package/dist/templates/loader.js +139 -12
- package/dist/templates/loader.js.map +1 -1
- package/dist/templates/registry.d.ts +31 -1
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +64 -0
- package/dist/templates/registry.js.map +1 -1
- package/dist/templates/types.d.ts +57 -0
- package/dist/templates/types.d.ts.map +1 -1
- package/dist/templates/validator.d.ts +166 -0
- package/dist/templates/validator.d.ts.map +1 -1
- package/dist/templates/validator.js +67 -2
- package/dist/templates/validator.js.map +1 -1
- package/dist/templates/version.d.ts +63 -0
- package/dist/templates/version.d.ts.map +1 -0
- package/dist/templates/version.js +119 -0
- package/dist/templates/version.js.map +1 -0
- package/dist/types/index.d.ts +12 -12
- package/package.json +1 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UX Research Template
|
|
3
|
+
*
|
|
4
|
+
* For synthesizing user research: interviews, insights, hypotheses, and personas.
|
|
5
|
+
* Helps AI understand the evidence behind product decisions and user needs.
|
|
6
|
+
*
|
|
7
|
+
* Entity types:
|
|
8
|
+
* - interview: Individual research sessions with participants
|
|
9
|
+
* - insight: Key learnings derived from research
|
|
10
|
+
* - hypothesis: Testable assumptions about user behavior
|
|
11
|
+
* - persona: Archetypal user representations
|
|
12
|
+
* - experiment: Tests to validate or invalidate hypotheses
|
|
13
|
+
*
|
|
14
|
+
* Key relationships:
|
|
15
|
+
* - supports/contradicts: Evidence relationships
|
|
16
|
+
* - derived_from: Traceability to source research
|
|
17
|
+
* - validates/invalidates: Experiment outcomes
|
|
18
|
+
*/
|
|
19
|
+
export const uxResearchTemplate = {
|
|
20
|
+
id: 'ux-research',
|
|
21
|
+
name: 'UX Research',
|
|
22
|
+
version: '1.0.0',
|
|
23
|
+
description: 'Synthesize user research: interviews, insights, hypotheses, and personas. Gives AI grounded context about user needs and product decisions.',
|
|
24
|
+
// Discovery metadata
|
|
25
|
+
category: 'research',
|
|
26
|
+
tags: ['ux', 'user-research', 'interviews', 'personas', 'insights', 'product-management'],
|
|
27
|
+
author: {
|
|
28
|
+
name: 'HiveForge',
|
|
29
|
+
url: 'https://github.com/hiveforge-sh',
|
|
30
|
+
},
|
|
31
|
+
repository: 'https://github.com/hiveforge-sh/hivemind',
|
|
32
|
+
sampleVault: 'samples/ux-research',
|
|
33
|
+
license: 'MIT',
|
|
34
|
+
entityTypes: [
|
|
35
|
+
{
|
|
36
|
+
name: 'interview',
|
|
37
|
+
displayName: 'Interview',
|
|
38
|
+
pluralName: 'Interviews',
|
|
39
|
+
description: 'A research session with a participant',
|
|
40
|
+
fields: [
|
|
41
|
+
{
|
|
42
|
+
name: 'participant',
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: true,
|
|
45
|
+
description: 'Anonymized participant identifier (e.g., P01, "Enterprise User 3")',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'date',
|
|
49
|
+
type: 'date',
|
|
50
|
+
required: true,
|
|
51
|
+
description: 'Date the interview was conducted',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'duration',
|
|
55
|
+
type: 'number',
|
|
56
|
+
description: 'Duration in minutes',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'method',
|
|
60
|
+
type: 'enum',
|
|
61
|
+
enumValues: ['in-person', 'video', 'phone', 'survey', 'contextual-inquiry', 'usability-test'],
|
|
62
|
+
description: 'Research method used',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'segment',
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'User segment (e.g., "Power Users", "New Customers")',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'researcher',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Who conducted the interview',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'recordingUrl',
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'Link to recording (if available)',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'keyQuotes',
|
|
81
|
+
type: 'array',
|
|
82
|
+
arrayItemType: 'string',
|
|
83
|
+
description: 'Notable verbatim quotes from participant',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'insight',
|
|
89
|
+
displayName: 'Insight',
|
|
90
|
+
pluralName: 'Insights',
|
|
91
|
+
description: 'A key learning derived from research',
|
|
92
|
+
fields: [
|
|
93
|
+
{
|
|
94
|
+
name: 'confidence',
|
|
95
|
+
type: 'enum',
|
|
96
|
+
enumValues: ['low', 'medium', 'high'],
|
|
97
|
+
description: 'Confidence level based on evidence strength',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'theme',
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Research theme or category',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'impact',
|
|
106
|
+
type: 'enum',
|
|
107
|
+
enumValues: ['low', 'medium', 'high', 'critical'],
|
|
108
|
+
description: 'Potential business/product impact',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'evidenceCount',
|
|
112
|
+
type: 'number',
|
|
113
|
+
description: 'Number of supporting data points',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'quotes',
|
|
117
|
+
type: 'array',
|
|
118
|
+
arrayItemType: 'string',
|
|
119
|
+
description: 'Supporting quotes from research',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'actionable',
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
description: 'Whether this insight has clear next steps',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'hypothesis',
|
|
130
|
+
displayName: 'Hypothesis',
|
|
131
|
+
pluralName: 'Hypotheses',
|
|
132
|
+
description: 'A testable assumption about user behavior or needs',
|
|
133
|
+
fields: [
|
|
134
|
+
{
|
|
135
|
+
name: 'hypothesisStatus',
|
|
136
|
+
type: 'enum',
|
|
137
|
+
enumValues: ['untested', 'testing', 'validated', 'invalidated', 'partially-validated'],
|
|
138
|
+
required: true,
|
|
139
|
+
description: 'Current validation status',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'statement',
|
|
143
|
+
type: 'string',
|
|
144
|
+
description: 'Formal hypothesis statement (We believe that... We will know we are right when...)',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'metric',
|
|
148
|
+
type: 'string',
|
|
149
|
+
description: 'Key metric to measure',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'target',
|
|
153
|
+
type: 'string',
|
|
154
|
+
description: 'Success threshold for the metric',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'priority',
|
|
158
|
+
type: 'enum',
|
|
159
|
+
enumValues: ['low', 'medium', 'high', 'critical'],
|
|
160
|
+
description: 'Priority for testing',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'riskIfWrong',
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'What happens if this hypothesis is wrong',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'persona',
|
|
171
|
+
displayName: 'Persona',
|
|
172
|
+
pluralName: 'Personas',
|
|
173
|
+
description: 'An archetypal user representation based on research',
|
|
174
|
+
fields: [
|
|
175
|
+
{
|
|
176
|
+
name: 'segment',
|
|
177
|
+
type: 'string',
|
|
178
|
+
required: true,
|
|
179
|
+
description: 'Market or user segment this persona represents',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'role',
|
|
183
|
+
type: 'string',
|
|
184
|
+
description: 'Job title or role',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'goals',
|
|
188
|
+
type: 'array',
|
|
189
|
+
arrayItemType: 'string',
|
|
190
|
+
description: 'Primary goals and motivations',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'frustrations',
|
|
194
|
+
type: 'array',
|
|
195
|
+
arrayItemType: 'string',
|
|
196
|
+
description: 'Pain points and frustrations',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'behaviors',
|
|
200
|
+
type: 'array',
|
|
201
|
+
arrayItemType: 'string',
|
|
202
|
+
description: 'Typical behaviors and patterns',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'tools',
|
|
206
|
+
type: 'array',
|
|
207
|
+
arrayItemType: 'string',
|
|
208
|
+
description: 'Tools and technologies they use',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'quote',
|
|
212
|
+
type: 'string',
|
|
213
|
+
description: 'Representative quote that captures their mindset',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'interviewCount',
|
|
217
|
+
type: 'number',
|
|
218
|
+
description: 'Number of interviews this persona is based on',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'experiment',
|
|
224
|
+
displayName: 'Experiment',
|
|
225
|
+
pluralName: 'Experiments',
|
|
226
|
+
description: 'A test designed to validate or invalidate a hypothesis',
|
|
227
|
+
fields: [
|
|
228
|
+
{
|
|
229
|
+
name: 'experimentStatus',
|
|
230
|
+
type: 'enum',
|
|
231
|
+
enumValues: ['planned', 'running', 'completed', 'cancelled'],
|
|
232
|
+
required: true,
|
|
233
|
+
description: 'Current status of the experiment',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'experimentType',
|
|
237
|
+
type: 'enum',
|
|
238
|
+
enumValues: ['a-b-test', 'usability-test', 'prototype-test', 'survey', 'analytics', 'fake-door', 'wizard-of-oz'],
|
|
239
|
+
description: 'Type of experiment',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'startDate',
|
|
243
|
+
type: 'date',
|
|
244
|
+
description: 'When the experiment started',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'endDate',
|
|
248
|
+
type: 'date',
|
|
249
|
+
description: 'When the experiment ended',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: 'sampleSize',
|
|
253
|
+
type: 'number',
|
|
254
|
+
description: 'Number of participants or data points',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'result',
|
|
258
|
+
type: 'enum',
|
|
259
|
+
enumValues: ['positive', 'negative', 'inconclusive', 'pending'],
|
|
260
|
+
description: 'Outcome of the experiment',
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: 'learnings',
|
|
264
|
+
type: 'array',
|
|
265
|
+
arrayItemType: 'string',
|
|
266
|
+
description: 'Key learnings from the experiment',
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
relationshipTypes: [
|
|
272
|
+
{
|
|
273
|
+
id: 'supports',
|
|
274
|
+
displayName: 'Supports',
|
|
275
|
+
description: 'Evidence that supports a hypothesis or insight',
|
|
276
|
+
sourceTypes: ['interview', 'insight', 'experiment'],
|
|
277
|
+
targetTypes: ['hypothesis', 'insight'],
|
|
278
|
+
bidirectional: false,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: 'contradicts',
|
|
282
|
+
displayName: 'Contradicts',
|
|
283
|
+
description: 'Evidence that contradicts a hypothesis or insight',
|
|
284
|
+
sourceTypes: ['interview', 'insight', 'experiment'],
|
|
285
|
+
targetTypes: ['hypothesis', 'insight'],
|
|
286
|
+
bidirectional: false,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: 'derived_from',
|
|
290
|
+
displayName: 'Derived From',
|
|
291
|
+
description: 'Insight or persona derived from interviews',
|
|
292
|
+
sourceTypes: ['insight', 'persona'],
|
|
293
|
+
targetTypes: ['interview'],
|
|
294
|
+
bidirectional: false,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: 'validates',
|
|
298
|
+
displayName: 'Validates',
|
|
299
|
+
description: 'Experiment validates a hypothesis',
|
|
300
|
+
sourceTypes: ['experiment'],
|
|
301
|
+
targetTypes: ['hypothesis'],
|
|
302
|
+
bidirectional: false,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: 'invalidates',
|
|
306
|
+
displayName: 'Invalidates',
|
|
307
|
+
description: 'Experiment invalidates a hypothesis',
|
|
308
|
+
sourceTypes: ['experiment'],
|
|
309
|
+
targetTypes: ['hypothesis'],
|
|
310
|
+
bidirectional: false,
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: 'represents',
|
|
314
|
+
displayName: 'Represents',
|
|
315
|
+
description: 'Persona represents a user segment from interviews',
|
|
316
|
+
sourceTypes: ['persona'],
|
|
317
|
+
targetTypes: ['interview'],
|
|
318
|
+
bidirectional: false,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
id: 'tests',
|
|
322
|
+
displayName: 'Tests',
|
|
323
|
+
description: 'Experiment tests a hypothesis',
|
|
324
|
+
sourceTypes: ['experiment'],
|
|
325
|
+
targetTypes: ['hypothesis'],
|
|
326
|
+
bidirectional: false,
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: 'informed_by',
|
|
330
|
+
displayName: 'Informed By',
|
|
331
|
+
description: 'Hypothesis informed by an insight',
|
|
332
|
+
sourceTypes: ['hypothesis'],
|
|
333
|
+
targetTypes: ['insight'],
|
|
334
|
+
bidirectional: false,
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
id: 'related',
|
|
338
|
+
displayName: 'Related To',
|
|
339
|
+
description: 'General relationship between any entities',
|
|
340
|
+
sourceTypes: 'any',
|
|
341
|
+
targetTypes: 'any',
|
|
342
|
+
bidirectional: true,
|
|
343
|
+
reverseId: 'related',
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
};
|
|
347
|
+
//# sourceMappingURL=ux-research.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux-research.js","sourceRoot":"","sources":["../../../src/templates/community/ux-research.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,6IAA6I;IAE1J,qBAAqB;IACrB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,CAAC;IACzF,MAAM,EAAE;QACN,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,iCAAiC;KACvC;IACD,UAAU,EAAE,0CAA0C;IACtD,WAAW,EAAE,qBAAqB;IAClC,OAAO,EAAE,KAAK;IAEd,WAAW,EAAE;QACX;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,WAAW;YACxB,UAAU,EAAE,YAAY;YACxB,WAAW,EAAE,uCAAuC;YACpD,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,oEAAoE;iBAClF;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,kCAAkC;iBAChD;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qBAAqB;iBACnC;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,UAAU,EAAE,CAAC,WAAW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EAAE,EAAE,WAAW;YACf,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,mCAAmC;YAChD,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,aAAa,EAAE,KAAK;SACrB;QACD;YACE,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,qCAAqC;YAClD,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,aAAa,EAAE,KAAK;SACrB;QACD;YACE,EAAE,EAAE,YAAY;YAChB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,mDAAmD;YAChE,WAAW,EAAE,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,CAAC,WAAW,CAAC;YAC1B,aAAa,EAAE,KAAK;SACrB;QACD;YACE,EAAE,EAAE,OAAO;YACX,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,+BAA+B;YAC5C,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,aAAa,EAAE,KAAK;SACrB;QACD;YACE,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,mCAAmC;YAChD,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,WAAW,EAAE,CAAC,SAAS,CAAC;YACxB,aAAa,EAAE,KAAK;SACrB;QACD;YACE,EAAE,EAAE,SAAS;YACb,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,2CAA2C;YACxD,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,SAAS;SACrB;KACF;CACF,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* 4. Activate the selected template
|
|
9
9
|
* 5. Pre-generate schemas for performance
|
|
10
10
|
*/
|
|
11
|
-
import type { TemplateConfig } from './types.js';
|
|
11
|
+
import type { TemplateConfig, TemplateDefinition } from './types.js';
|
|
12
12
|
/**
|
|
13
13
|
* Find the config.json file.
|
|
14
14
|
*
|
|
@@ -22,10 +22,11 @@ import type { TemplateConfig } from './types.js';
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function findConfigFile(configPath?: string): string | null;
|
|
24
24
|
/**
|
|
25
|
-
* Load template configuration from config.json.
|
|
25
|
+
* Load template configuration from config.json and/or standalone template.json.
|
|
26
26
|
*
|
|
27
27
|
* Searches for config.json in multiple locations and extracts the template
|
|
28
|
-
* section.
|
|
28
|
+
* section. Also checks for standalone template.json in the same directory,
|
|
29
|
+
* which takes precedence over inline template definitions.
|
|
29
30
|
*
|
|
30
31
|
* @param configPath - Optional explicit path to config file
|
|
31
32
|
* @returns Template configuration object
|
|
@@ -35,13 +36,26 @@ export declare function loadTemplateConfig(configPath?: string): TemplateConfig;
|
|
|
35
36
|
/**
|
|
36
37
|
* Register all built-in templates.
|
|
37
38
|
*
|
|
38
|
-
*
|
|
39
|
+
* Includes:
|
|
39
40
|
* - worldbuilding: Characters, locations, events, factions, lore, assets
|
|
41
|
+
* - research: Papers, citations, concepts, notes
|
|
42
|
+
* - people-management: People, goals, teams, 1:1 meetings
|
|
40
43
|
*
|
|
41
44
|
* This function should be called before loading user templates to ensure
|
|
42
45
|
* built-in templates can be referenced by ID.
|
|
43
46
|
*/
|
|
44
47
|
export declare function registerBuiltinTemplates(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Register all community-contributed templates.
|
|
50
|
+
*
|
|
51
|
+
* Community templates are registered as 'config' source (not 'builtin')
|
|
52
|
+
* to distinguish them from core templates while still making them available
|
|
53
|
+
* for activation.
|
|
54
|
+
*
|
|
55
|
+
* This function should be called after built-in templates and before user
|
|
56
|
+
* templates so that user templates can override community templates if needed.
|
|
57
|
+
*/
|
|
58
|
+
export declare function registerCommunityTemplates(): void;
|
|
45
59
|
/**
|
|
46
60
|
* Register user-defined templates from config.
|
|
47
61
|
*
|
|
@@ -75,10 +89,11 @@ export declare function pregenerateSchemas(): void;
|
|
|
75
89
|
*
|
|
76
90
|
* Performs complete setup:
|
|
77
91
|
* 1. Register built-in templates
|
|
78
|
-
* 2.
|
|
79
|
-
* 3.
|
|
80
|
-
* 4.
|
|
81
|
-
* 5.
|
|
92
|
+
* 2. Register community templates
|
|
93
|
+
* 3. Load config from file
|
|
94
|
+
* 4. Register user-defined templates
|
|
95
|
+
* 5. Activate selected template
|
|
96
|
+
* 6. Pre-generate schemas
|
|
82
97
|
*
|
|
83
98
|
* This is the main entry point for template system initialization.
|
|
84
99
|
* Call this at application startup before using any template features.
|
|
@@ -95,6 +110,48 @@ export declare function pregenerateSchemas(): void;
|
|
|
95
110
|
* ```
|
|
96
111
|
*/
|
|
97
112
|
export declare function initializeTemplates(configPath?: string): TemplateConfig;
|
|
113
|
+
/**
|
|
114
|
+
* Load a standalone template file from disk.
|
|
115
|
+
*
|
|
116
|
+
* Reads a JSON file containing a template definition and validates it
|
|
117
|
+
* against the TemplateDefinitionSchema.
|
|
118
|
+
*
|
|
119
|
+
* @param filePath - Path to the template JSON file
|
|
120
|
+
* @returns Validated template definition
|
|
121
|
+
* @throws {Error} If file cannot be read or parsed
|
|
122
|
+
* @throws {TemplateValidationError} If template fails validation
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* const template = loadTemplateFile('./template.json');
|
|
127
|
+
* console.log(`Loaded template: ${template.name}`);
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function loadTemplateFile(filePath: string): TemplateDefinition;
|
|
131
|
+
/**
|
|
132
|
+
* Validate a template file without loading it into the registry.
|
|
133
|
+
*
|
|
134
|
+
* Useful for CLI tools and pre-flight validation. Returns the validated
|
|
135
|
+
* template if successful, throws TemplateValidationError with details if not.
|
|
136
|
+
*
|
|
137
|
+
* @param filePath - Path to the template JSON file
|
|
138
|
+
* @returns Validated template definition
|
|
139
|
+
* @throws {Error} If file cannot be read or parsed
|
|
140
|
+
* @throws {TemplateValidationError} If template fails validation
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* try {
|
|
145
|
+
* const template = validateTemplateFile('./template.json');
|
|
146
|
+
* console.log(`Template "${template.name}" is valid!`);
|
|
147
|
+
* } catch (err) {
|
|
148
|
+
* if (err instanceof TemplateValidationError) {
|
|
149
|
+
* console.error(err.toUserMessage());
|
|
150
|
+
* }
|
|
151
|
+
* }
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare function validateTemplateFile(filePath: string): TemplateDefinition;
|
|
98
155
|
/**
|
|
99
156
|
* Convenience function to get an entity schema by name.
|
|
100
157
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/templates/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/templates/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AASrE;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoBjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,CAuEtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAOjD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CASlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAQzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,CAoBvE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CA2BrE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CAEzE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,8DAWrD"}
|