@lucern/pack-host 0.1.0-alpha.2

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 (104) hide show
  1. package/README.md +64 -0
  2. package/dist/contracts.d.ts +77 -0
  3. package/dist/contracts.js +21 -0
  4. package/dist/contracts.js.map +1 -0
  5. package/dist/convex.config.d.ts +5 -0
  6. package/dist/convex.config.js +9 -0
  7. package/dist/convex.config.js.map +1 -0
  8. package/dist/dependencyResolution.d.ts +18 -0
  9. package/dist/dependencyResolution.js +131 -0
  10. package/dist/dependencyResolution.js.map +1 -0
  11. package/dist/domain-pack/authoring.d.ts +172 -0
  12. package/dist/domain-pack/authoring.js +1896 -0
  13. package/dist/domain-pack/authoring.js.map +1 -0
  14. package/dist/domain-pack/contracts.d.ts +183 -0
  15. package/dist/domain-pack/contracts.js +65 -0
  16. package/dist/domain-pack/contracts.js.map +1 -0
  17. package/dist/domain-pack/index.d.ts +8 -0
  18. package/dist/domain-pack/index.js +3813 -0
  19. package/dist/domain-pack/index.js.map +1 -0
  20. package/dist/domain-pack/ontology/software-entities-v1.d.ts +102 -0
  21. package/dist/domain-pack/ontology/software-entities-v1.js +104 -0
  22. package/dist/domain-pack/ontology/software-entities-v1.js.map +1 -0
  23. package/dist/domain-pack/packs/developer-reasoning.d.ts +14 -0
  24. package/dist/domain-pack/packs/developer-reasoning.js +339 -0
  25. package/dist/domain-pack/packs/developer-reasoning.js.map +1 -0
  26. package/dist/domain-pack/packs/engineering-accelerator.d.ts +11 -0
  27. package/dist/domain-pack/packs/engineering-accelerator.js +1348 -0
  28. package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -0
  29. package/dist/domain-pack/packs/index.d.ts +18 -0
  30. package/dist/domain-pack/packs/index.js +2653 -0
  31. package/dist/domain-pack/packs/index.js.map +1 -0
  32. package/dist/domain-pack/shaping.d.ts +54 -0
  33. package/dist/domain-pack/shaping.js +1013 -0
  34. package/dist/domain-pack/shaping.js.map +1 -0
  35. package/dist/domain-pack/validation.d.ts +26 -0
  36. package/dist/domain-pack/validation.js +775 -0
  37. package/dist/domain-pack/validation.js.map +1 -0
  38. package/dist/domain-pack.d.ts +8 -0
  39. package/dist/domain-pack.js +3813 -0
  40. package/dist/domain-pack.js.map +1 -0
  41. package/dist/index.d.ts +29 -0
  42. package/dist/index.js +5520 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/lifecycle.d.ts +27 -0
  45. package/dist/lifecycle.js +98 -0
  46. package/dist/lifecycle.js.map +1 -0
  47. package/dist/manifestValidation.d.ts +28 -0
  48. package/dist/manifestValidation.js +253 -0
  49. package/dist/manifestValidation.js.map +1 -0
  50. package/dist/manifests/chat-v1.d.ts +10 -0
  51. package/dist/manifests/chat-v1.js +87 -0
  52. package/dist/manifests/chat-v1.js.map +1 -0
  53. package/dist/manifests/deals-v1.d.ts +10 -0
  54. package/dist/manifests/deals-v1.js +107 -0
  55. package/dist/manifests/deals-v1.js.map +1 -0
  56. package/dist/manifests/decisions-v1.d.ts +10 -0
  57. package/dist/manifests/decisions-v1.js +103 -0
  58. package/dist/manifests/decisions-v1.js.map +1 -0
  59. package/dist/manifests/documents-v1.d.ts +10 -0
  60. package/dist/manifests/documents-v1.js +88 -0
  61. package/dist/manifests/documents-v1.js.map +1 -0
  62. package/dist/manifests/epistemic-algorithms-v1.d.ts +10 -0
  63. package/dist/manifests/epistemic-algorithms-v1.js +107 -0
  64. package/dist/manifests/epistemic-algorithms-v1.js.map +1 -0
  65. package/dist/manifests/graph-visualization-v1.d.ts +10 -0
  66. package/dist/manifests/graph-visualization-v1.js +88 -0
  67. package/dist/manifests/graph-visualization-v1.js.map +1 -0
  68. package/dist/manifests/index.d.ts +23 -0
  69. package/dist/manifests/index.js +955 -0
  70. package/dist/manifests/index.js.map +1 -0
  71. package/dist/manifests/news-v1.d.ts +10 -0
  72. package/dist/manifests/news-v1.js +93 -0
  73. package/dist/manifests/news-v1.js.map +1 -0
  74. package/dist/manifests/philosophy-mode-v1.d.ts +10 -0
  75. package/dist/manifests/philosophy-mode-v1.js +100 -0
  76. package/dist/manifests/philosophy-mode-v1.js.map +1 -0
  77. package/dist/manifests/task-management-v1.d.ts +10 -0
  78. package/dist/manifests/task-management-v1.js +86 -0
  79. package/dist/manifests/task-management-v1.js.map +1 -0
  80. package/dist/manifests/team-analysis-v1.d.ts +10 -0
  81. package/dist/manifests/team-analysis-v1.js +93 -0
  82. package/dist/manifests/team-analysis-v1.js.map +1 -0
  83. package/dist/manifests/themes-v1.d.ts +10 -0
  84. package/dist/manifests/themes-v1.js +118 -0
  85. package/dist/manifests/themes-v1.js.map +1 -0
  86. package/dist/manifests/user-profiles-v1.d.ts +10 -0
  87. package/dist/manifests/user-profiles-v1.js +100 -0
  88. package/dist/manifests/user-profiles-v1.js.map +1 -0
  89. package/dist/manifests.d.ts +14 -0
  90. package/dist/manifests.js +955 -0
  91. package/dist/manifests.js.map +1 -0
  92. package/dist/namespacePolicy.d.ts +26 -0
  93. package/dist/namespacePolicy.js +129 -0
  94. package/dist/namespacePolicy.js.map +1 -0
  95. package/dist/registry.d.ts +13 -0
  96. package/dist/registry.js +1710 -0
  97. package/dist/registry.js.map +1 -0
  98. package/dist/runtime.d.ts +19 -0
  99. package/dist/runtime.js +638 -0
  100. package/dist/runtime.js.map +1 -0
  101. package/dist/serviceContracts.d.ts +18 -0
  102. package/dist/serviceContracts.js +64 -0
  103. package/dist/serviceContracts.js.map +1 -0
  104. package/package.json +48 -0
@@ -0,0 +1,955 @@
1
+ // src/contracts.ts
2
+ function normalizeStringArray(values) {
3
+ const normalized = values.map((value) => value.trim()).filter((value) => value.length > 0);
4
+ return Array.from(new Set(normalized));
5
+ }
6
+ function defineAppPackManifest(manifest) {
7
+ const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({
8
+ ...integration,
9
+ contracts: normalizeStringArray(integration.contracts)
10
+ }));
11
+ return {
12
+ ...manifest,
13
+ dependencies: normalizeStringArray(manifest.dependencies),
14
+ capabilityFlags: normalizeStringArray(manifest.capabilityFlags),
15
+ sharedServices
16
+ };
17
+ }
18
+
19
+ // src/manifests/chat-v1.ts
20
+ var chatV1Manifest = defineAppPackManifest({
21
+ key: "chat-v1",
22
+ name: "Chat",
23
+ version: "1.0.0",
24
+ lifecycle: "active",
25
+ category: "conversation",
26
+ description: "Core conversational runtime, streaming orchestration, and tool invocation shell.",
27
+ dependencies: [],
28
+ capabilityFlags: [
29
+ "chat.streaming",
30
+ "chat.history",
31
+ "tool.invocation",
32
+ "slash.commands",
33
+ "voice.mode"
34
+ ],
35
+ routeNamespace: {
36
+ web: ["/(chat)/chat", "/(chat)/chat/[id]"],
37
+ api: [
38
+ "/(chat)/api/chat",
39
+ "/(chat)/api/coach",
40
+ "/(chat)/api/history",
41
+ "/(chat)/api/suggestions",
42
+ "/(chat)/api/vote"
43
+ ]
44
+ },
45
+ surfaces: {
46
+ components: [
47
+ "components/chat/*",
48
+ "components/chat/sidebars/*",
49
+ "components/chat/viewers/*"
50
+ ],
51
+ convex: ["convex/chats.ts", "convex/messages.ts", "convex/chatState.ts"],
52
+ tools: ["lib/ai/tools/project-tools.ts"]
53
+ },
54
+ policyProfile: {
55
+ audiences: ["internal", "lp", "public"],
56
+ rules: [
57
+ { resource: "project", actions: ["read", "summarize"] },
58
+ {
59
+ resource: "tool_action",
60
+ actions: ["read", "mutate"],
61
+ notes: "Mutation tools must pass server-side policy checks."
62
+ },
63
+ { resource: "artifact", actions: ["read", "summarize"] }
64
+ ]
65
+ },
66
+ dataContract: {
67
+ requiredNodeTypes: ["belief", "question", "evidence", "theme", "deal"],
68
+ requiredEdgeTypes: ["informs", "answers", "belongs_to"],
69
+ requiredTables: ["chats", "messages", "chatState", "projects"],
70
+ projectionBehavior: "inherits_policy"
71
+ },
72
+ templates: {
73
+ workflows: ["chat/default", "chat/voice-mode"],
74
+ prompts: ["chat/main-system-prompt", "chat/voice-mode-style"],
75
+ reports: [],
76
+ uiLabels: ["chat", "assistant", "conversation"]
77
+ },
78
+ testSuite: {
79
+ parity: ["chat-streaming-parity", "slash-command-parity"],
80
+ policy: ["chat-context-filtering", "tool-deny-enforcement"],
81
+ contract: ["chat-pack-contract-v1"]
82
+ }
83
+ });
84
+
85
+ // src/manifests/deals-v1.ts
86
+ var dealsV1Manifest = defineAppPackManifest({
87
+ key: "deals-v1",
88
+ name: "Deals",
89
+ version: "1.0.0",
90
+ lifecycle: "beta",
91
+ category: "domain",
92
+ description: "Deal diligence application using shared reasoning graph primitives with deal-calibrated workflows.",
93
+ dependencies: [
94
+ "chat-v1",
95
+ "documents-v1",
96
+ "news-v1",
97
+ "decisions-v1"
98
+ ],
99
+ capabilityFlags: [
100
+ "deal.lifecycle",
101
+ "diligence.workflow",
102
+ "deal.risk-assessment",
103
+ "decision.integration"
104
+ ],
105
+ routeNamespace: {
106
+ web: ["/(projects)/projects", "/(projects)/projects/[projectId]"],
107
+ api: ["/api/research/*", "/api/tasks/*", "/api/reports/*"]
108
+ },
109
+ surfaces: {
110
+ components: [
111
+ "app/(projects)/projects/page.tsx",
112
+ "components/project/*",
113
+ "components/workspace/views/*"
114
+ ],
115
+ convex: ["convex/projects.ts", "convex/epistemicDecisions.ts"],
116
+ tools: [
117
+ "lib/ai/tools/navigation-tools.ts",
118
+ "lib/ai/tools/decision-tools.ts"
119
+ ]
120
+ },
121
+ policyProfile: {
122
+ audiences: ["internal", "lp"],
123
+ rules: [
124
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
125
+ { resource: "node", actions: ["read", "summarize", "mutate"] },
126
+ { resource: "artifact", actions: ["read", "summarize", "export"] },
127
+ { resource: "tool_action", actions: ["read", "mutate"] }
128
+ ]
129
+ },
130
+ dataContract: {
131
+ requiredNodeTypes: ["deal", "belief", "question", "evidence", "decision"],
132
+ requiredEdgeTypes: [
133
+ "evaluates",
134
+ "informs",
135
+ "depends_on",
136
+ "based_on_belief"
137
+ ],
138
+ requiredTables: [
139
+ "projects",
140
+ "epistemicNodes",
141
+ "epistemicEdges",
142
+ "decisionEvents"
143
+ ],
144
+ projectionBehavior: "projection_required"
145
+ },
146
+ templates: {
147
+ workflows: ["deals/diligence-default", "deals/ic-prep"],
148
+ prompts: ["deals/main-system-prompt", "deals/risk-ledger-draft"],
149
+ reports: ["deal-memo", "knowledge-map"],
150
+ uiLabels: ["deal", "diligence", "investment_case", "ic_readiness"]
151
+ },
152
+ testSuite: {
153
+ parity: ["deal-workflow-parity"],
154
+ policy: ["deal-data-audience-filtering"],
155
+ contract: ["deals-pack-contract-v1"]
156
+ },
157
+ sharedServices: [
158
+ {
159
+ service: "decision-kernel",
160
+ mode: "required",
161
+ contracts: ["decision-kernel-v1"]
162
+ },
163
+ {
164
+ service: "knowledge-compiler",
165
+ mode: "required",
166
+ contracts: ["knowledge-compiler-v1"]
167
+ }
168
+ ]
169
+ });
170
+
171
+ // src/manifests/decisions-v1.ts
172
+ var decisionsV1Manifest = defineAppPackManifest({
173
+ key: "decisions-v1",
174
+ name: "Decisions",
175
+ version: "1.0.0",
176
+ lifecycle: "beta",
177
+ category: "decision",
178
+ description: "Graph-native decision workflow with belief-level voting, risk ledgers, and snapshot locking.",
179
+ dependencies: ["epistemic-algorithms-v1"],
180
+ capabilityFlags: [
181
+ "decision.workflow",
182
+ "belief.level-voting",
183
+ "risk.ledger",
184
+ "decision.snapshot"
185
+ ],
186
+ routeNamespace: {
187
+ web: ["/(projects)/projects/[projectId]/decisions"],
188
+ api: ["/api/thesis-audit/*", "/api/reports/*"]
189
+ },
190
+ surfaces: {
191
+ components: ["app/(projects)/projects/[projectId]/decisions/page.tsx"],
192
+ convex: ["convex/epistemicDecisions.ts", "convex/convictionEngine.ts"],
193
+ tools: [
194
+ "lib/ai/tools/decision-tools.ts",
195
+ "lib/ai/tools/conviction-tools.ts"
196
+ ]
197
+ },
198
+ policyProfile: {
199
+ audiences: ["internal", "lp"],
200
+ rules: [
201
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
202
+ { resource: "node", actions: ["read", "summarize", "mutate"] },
203
+ { resource: "edge", actions: ["read", "mutate"] },
204
+ { resource: "artifact", actions: ["read", "export"] }
205
+ ]
206
+ },
207
+ dataContract: {
208
+ requiredNodeTypes: ["decision", "belief", "question", "evidence", "theme"],
209
+ requiredEdgeTypes: [
210
+ "based_on_belief",
211
+ "based_on_question",
212
+ "informed_by_theme",
213
+ "blocked_by_contradiction"
214
+ ],
215
+ requiredTables: [
216
+ "epistemicNodes",
217
+ "epistemicEdges",
218
+ "decisionEvents",
219
+ "beliefVotes",
220
+ "decisionRiskLedger",
221
+ "decisionSnapshots"
222
+ ],
223
+ projectionBehavior: "projection_required"
224
+ },
225
+ templates: {
226
+ workflows: ["decisions/pre-ic", "decisions/in-ic", "decisions/post-ic"],
227
+ prompts: [
228
+ "decisions/main-system-prompt",
229
+ "decisions/risk-ledger-assistant"
230
+ ],
231
+ reports: ["decision-brief", "ic-memo"],
232
+ uiLabels: ["decision", "risk_ledger", "vote_map", "snapshot"]
233
+ },
234
+ testSuite: {
235
+ parity: ["decision-flow-parity"],
236
+ policy: ["decision-lineage-visibility"],
237
+ contract: ["decisions-pack-contract-v1"]
238
+ },
239
+ sharedServices: [
240
+ {
241
+ service: "decision-kernel",
242
+ mode: "required",
243
+ contracts: ["decision-kernel-v1"]
244
+ },
245
+ {
246
+ service: "knowledge-compiler",
247
+ mode: "required",
248
+ contracts: ["knowledge-compiler-v1"]
249
+ }
250
+ ]
251
+ });
252
+
253
+ // src/manifests/documents-v1.ts
254
+ var documentsV1Manifest = defineAppPackManifest({
255
+ key: "documents-v1",
256
+ name: "Documents",
257
+ version: "1.0.0",
258
+ lifecycle: "active",
259
+ category: "documents",
260
+ description: "Document upload, extraction, annotation, and conversion into graph-grounded evidence.",
261
+ dependencies: ["chat-v1"],
262
+ capabilityFlags: [
263
+ "document.ingestion",
264
+ "document.extraction",
265
+ "document.annotation",
266
+ "document.rag"
267
+ ],
268
+ routeNamespace: {
269
+ web: [
270
+ "/(projects)/projects/[projectId]/documents",
271
+ "/(projects)/projects/[projectId]/documents/[documentId]"
272
+ ],
273
+ api: ["/api/documents/*", "/api/rag/document", "/api/rag/extract-pdf"]
274
+ },
275
+ surfaces: {
276
+ components: ["components/documents/*", "components/document/*"],
277
+ convex: [
278
+ "convex/projectDocuments.ts",
279
+ "convex/documents.ts",
280
+ "convex/documentAnnotations.ts",
281
+ "convex/projectDocumentsActions.ts"
282
+ ],
283
+ tools: ["lib/ai/tools/create-document.ts"]
284
+ },
285
+ policyProfile: {
286
+ audiences: ["internal", "lp"],
287
+ rules: [
288
+ { resource: "artifact", actions: ["read", "summarize", "mutate"] },
289
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
290
+ { resource: "tool_action", actions: ["read", "mutate"] }
291
+ ]
292
+ },
293
+ dataContract: {
294
+ requiredNodeTypes: ["source", "excerpt", "evidence", "synthesis"],
295
+ requiredEdgeTypes: ["extracted_from", "based_on", "informs"],
296
+ requiredTables: [
297
+ "projectDocuments",
298
+ "projectDocumentsSyncLog",
299
+ "documentAnnotations",
300
+ "epistemicNodes"
301
+ ],
302
+ projectionBehavior: "inherits_policy"
303
+ },
304
+ templates: {
305
+ workflows: [
306
+ "documents/upload-extract-link",
307
+ "documents/annotate-to-evidence"
308
+ ],
309
+ prompts: ["documents/extraction", "documents/summarization"],
310
+ reports: [],
311
+ uiLabels: ["documents", "annotations", "excerpts", "sources"]
312
+ },
313
+ testSuite: {
314
+ parity: ["documents-page-parity"],
315
+ policy: ["document-access-enforcement"],
316
+ contract: ["documents-pack-contract-v1"]
317
+ }
318
+ });
319
+
320
+ // src/manifests/epistemic-algorithms-v1.ts
321
+ var epistemicAlgorithmsV1Manifest = defineAppPackManifest({
322
+ key: "epistemic-algorithms-v1",
323
+ name: "Epistemic Algorithms",
324
+ version: "1.0.0",
325
+ lifecycle: "active",
326
+ category: "analytics",
327
+ description: "Reasoning quality engines: contradiction detection, conviction dynamics, and graph intelligence analytics.",
328
+ dependencies: ["graph-visualization-v1", "chat-v1"],
329
+ capabilityFlags: [
330
+ "contradiction.detection",
331
+ "conviction.analytics",
332
+ "reasoning.depth",
333
+ "bias.detection"
334
+ ],
335
+ routeNamespace: {
336
+ web: [
337
+ "/(projects)/projects/[projectId]/contradictions",
338
+ "/(projects)/projects/[projectId]/thesis-audit"
339
+ ],
340
+ api: ["/api/thesis-audit", "/api/graph-explain", "/api/lucern/*"]
341
+ },
342
+ surfaces: {
343
+ components: ["components/epistemic/*", "components/contradiction/*"],
344
+ convex: [
345
+ "convex/contradictions.ts",
346
+ "convex/convictionEngine.ts",
347
+ "convex/graphIntelligence.ts",
348
+ "convex/thesisAuditAgents.ts"
349
+ ],
350
+ tools: ["lib/ai/tools/graph-intelligence-tools.ts"]
351
+ },
352
+ policyProfile: {
353
+ audiences: ["internal", "lp"],
354
+ rules: [
355
+ { resource: "node", actions: ["read", "summarize"] },
356
+ { resource: "edge", actions: ["read", "summarize"] },
357
+ { resource: "artifact", actions: ["read", "summarize", "export"] }
358
+ ]
359
+ },
360
+ dataContract: {
361
+ requiredNodeTypes: ["belief", "question", "evidence", "theme", "decision"],
362
+ requiredEdgeTypes: [
363
+ "informs",
364
+ "contradicts",
365
+ "depends_on",
366
+ "strengthened_by",
367
+ "weakened_by",
368
+ "collapses_if"
369
+ ],
370
+ requiredTables: [
371
+ "contradictions",
372
+ "beliefConfidence",
373
+ "epistemicAudit",
374
+ "graphAnalysisResults"
375
+ ],
376
+ projectionBehavior: "inherits_policy"
377
+ },
378
+ templates: {
379
+ workflows: ["epistemic/contradiction-resolution", "epistemic/thesis-audit"],
380
+ prompts: [
381
+ "graph-intelligence/full-guide",
382
+ "graph-intelligence/bias-detection"
383
+ ],
384
+ reports: ["knowledge_map"],
385
+ uiLabels: [
386
+ "contradiction",
387
+ "conviction",
388
+ "thesis_audit",
389
+ "epistemic_health"
390
+ ]
391
+ },
392
+ testSuite: {
393
+ parity: ["epistemic-algorithm-output-parity"],
394
+ policy: ["epistemic-output-scope-filtering"],
395
+ contract: ["epistemic-algorithms-pack-contract-v1"]
396
+ },
397
+ sharedServices: [
398
+ {
399
+ service: "knowledge-compiler",
400
+ mode: "required",
401
+ contracts: ["knowledge-compiler-v1"]
402
+ }
403
+ ]
404
+ });
405
+
406
+ // src/manifests/graph-visualization-v1.ts
407
+ var graphVisualizationV1Manifest = defineAppPackManifest({
408
+ key: "graph-visualization-v1",
409
+ name: "Graph Visualization",
410
+ version: "1.0.0",
411
+ lifecycle: "active",
412
+ category: "graph",
413
+ description: "Interactive graph explorer for node/edge traversal, neighborhood inspection, and query rendering.",
414
+ dependencies: ["chat-v1"],
415
+ capabilityFlags: [
416
+ "graph.rendering",
417
+ "graph.query",
418
+ "graph.highlighting",
419
+ "graph.neighborhood"
420
+ ],
421
+ routeNamespace: {
422
+ web: ["/(projects)/projects/[projectId]/graph"],
423
+ api: ["/api/graph", "/api/graph-query", "/api/graph-suggestions"]
424
+ },
425
+ surfaces: {
426
+ components: [
427
+ "app/(projects)/projects/[projectId]/graph/components/*",
428
+ "components/workspace/views/ProjectHomeView.tsx"
429
+ ],
430
+ convex: ["convex/epistemicQueries.ts", "convex/neo4jQueries.ts"],
431
+ tools: [
432
+ "lib/ai/tools/knowledge-graph-tools.ts",
433
+ "lib/ai/tools/cypher-tools.ts"
434
+ ]
435
+ },
436
+ policyProfile: {
437
+ audiences: ["internal", "lp"],
438
+ rules: [
439
+ { resource: "node", actions: ["read", "summarize"] },
440
+ { resource: "edge", actions: ["read", "summarize"] },
441
+ { resource: "tool_action", actions: ["read"] }
442
+ ]
443
+ },
444
+ dataContract: {
445
+ requiredNodeTypes: [
446
+ "belief",
447
+ "question",
448
+ "evidence",
449
+ "theme",
450
+ "deal",
451
+ "decision"
452
+ ],
453
+ requiredEdgeTypes: ["informs", "answers", "belongs_to", "depends_on"],
454
+ requiredTables: ["epistemicNodes", "epistemicEdges"],
455
+ projectionBehavior: "inherits_policy"
456
+ },
457
+ templates: {
458
+ workflows: ["graph/query-and-traverse"],
459
+ prompts: [
460
+ "graph-intelligence/query",
461
+ "graph-intelligence/suggestions-extraction"
462
+ ],
463
+ reports: [],
464
+ uiLabels: ["graph", "nodes", "edges", "lineage"]
465
+ },
466
+ testSuite: {
467
+ parity: ["graph-query-parity", "graph-render-parity"],
468
+ policy: ["graph-node-visibility-filtering"],
469
+ contract: ["graph-visualization-pack-contract-v1"]
470
+ }
471
+ });
472
+
473
+ // src/manifests/news-v1.ts
474
+ var newsV1Manifest = defineAppPackManifest({
475
+ key: "news-v1",
476
+ name: "News",
477
+ version: "1.0.0",
478
+ lifecycle: "active",
479
+ category: "news",
480
+ description: "News ingestion, curation, and contextual linkage into the reasoning graph.",
481
+ dependencies: ["chat-v1"],
482
+ capabilityFlags: [
483
+ "news.search",
484
+ "news.ingestion",
485
+ "news.curation",
486
+ "news.graph-linkage"
487
+ ],
488
+ routeNamespace: {
489
+ web: [
490
+ "/(projects)/projects/[projectId]/news-v3",
491
+ "/(projects)/projects/[projectId]/news-v3/[articleId]"
492
+ ],
493
+ api: ["/api/news/search", "/api/intelligence/smart-news-search"]
494
+ },
495
+ surfaces: {
496
+ components: ["components/news/*"],
497
+ convex: [
498
+ "convex/projectNews.ts",
499
+ "convex/newsArticles.ts",
500
+ "convex/newsCurationJobs.ts",
501
+ "convex/articleCache.ts"
502
+ ],
503
+ tools: ["lib/ai/tools/research-tools.ts"]
504
+ },
505
+ policyProfile: {
506
+ audiences: ["internal", "lp", "public"],
507
+ rules: [
508
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
509
+ { resource: "artifact", actions: ["read", "summarize", "export"] },
510
+ { resource: "node", actions: ["read", "summarize"] }
511
+ ]
512
+ },
513
+ dataContract: {
514
+ requiredNodeTypes: ["source", "evidence", "synthesis", "theme", "deal"],
515
+ requiredEdgeTypes: ["extracted_from", "informs", "belongs_to"],
516
+ requiredTables: [
517
+ "projectNews",
518
+ "savedNewsArticles",
519
+ "newsCurationJobs",
520
+ "articleCache",
521
+ "epistemicNodes"
522
+ ],
523
+ projectionBehavior: "inherits_policy"
524
+ },
525
+ templates: {
526
+ workflows: ["news/search-import-curate", "news/evidence-linking"],
527
+ prompts: ["news/summary", "news/relevance-scoring"],
528
+ reports: ["news-digest"],
529
+ uiLabels: ["news", "articles", "curation", "signals"]
530
+ },
531
+ testSuite: {
532
+ parity: ["news-v3-parity"],
533
+ policy: ["news-audience-redaction"],
534
+ contract: ["news-pack-contract-v1"]
535
+ },
536
+ sharedServices: [
537
+ {
538
+ service: "knowledge-compiler",
539
+ mode: "required",
540
+ contracts: ["knowledge-compiler-v1"]
541
+ }
542
+ ]
543
+ });
544
+
545
+ // src/manifests/philosophy-mode-v1.ts
546
+ var philosophyModeV1Manifest = defineAppPackManifest({
547
+ key: "philosophy-mode-v1",
548
+ name: "Philosophy Mode",
549
+ version: "1.0.0",
550
+ lifecycle: "active",
551
+ category: "domain",
552
+ description: "Investor worldview extraction, archetype synthesis, and philosophy profile management.",
553
+ dependencies: ["chat-v1", "user-profiles-v1"],
554
+ capabilityFlags: [
555
+ "philosophy.extraction",
556
+ "philosophy.profiles",
557
+ "archetype.classification",
558
+ "worldview.synthesis"
559
+ ],
560
+ routeNamespace: {
561
+ web: ["/(chat)/chat/[id]"],
562
+ api: [
563
+ "/api/philosophy/detect",
564
+ "/api/philosophy/extract",
565
+ "/api/philosophy/get-profile",
566
+ "/api/philosophy/ingest",
567
+ "/api/philosophy/synthesize"
568
+ ]
569
+ },
570
+ surfaces: {
571
+ components: [
572
+ "components/chat/sidebars/PhilosophyModeSidebar.tsx",
573
+ "components/philosophy/ArchetypeDisplay.tsx"
574
+ ],
575
+ convex: [
576
+ "convex/philosophy.ts",
577
+ "convex/philosophyQueries.ts",
578
+ "convex/projectPhilosophy.ts"
579
+ ],
580
+ tools: ["lib/ai/tools/philosophy-tools.ts"]
581
+ },
582
+ policyProfile: {
583
+ audiences: ["internal"],
584
+ rules: [
585
+ { resource: "user_profile", actions: ["read", "mutate"] },
586
+ { resource: "project", actions: ["read", "summarize"] },
587
+ { resource: "tool_action", actions: ["read", "mutate"] }
588
+ ]
589
+ },
590
+ dataContract: {
591
+ requiredNodeTypes: ["belief", "question", "theme"],
592
+ requiredEdgeTypes: ["belongs_to", "relates_to_thesis"],
593
+ requiredTables: [
594
+ "marketPhilosophyProfiles",
595
+ "marketPhilosophyAtoms",
596
+ "marketPhilosophyContent",
597
+ "philosophyUploads"
598
+ ],
599
+ projectionBehavior: "inherits_policy"
600
+ },
601
+ templates: {
602
+ workflows: ["philosophy/conversation-to-profile"],
603
+ prompts: [
604
+ "philosophy/deep-thinker",
605
+ "philosophy/welcome-back",
606
+ "philosophy/detect-philosophical-statement",
607
+ "philosophy/content-classifier",
608
+ "philosophy/atom-extractor",
609
+ "philosophy/summarize-investor-profile",
610
+ "philosophy/team-aggregator",
611
+ "philosophy/market-synthesis",
612
+ "thematic/extractor"
613
+ ],
614
+ reports: [],
615
+ uiLabels: ["philosophy_mode", "investor_worldview", "archetype"]
616
+ },
617
+ testSuite: {
618
+ parity: ["philosophy-profile-parity"],
619
+ policy: ["philosophy-profile-isolation"],
620
+ contract: ["philosophy-pack-contract-v1"]
621
+ }
622
+ });
623
+
624
+ // src/manifests/task-management-v1.ts
625
+ var taskManagementV1Manifest = defineAppPackManifest({
626
+ key: "task-management-v1",
627
+ name: "Task Management",
628
+ version: "1.0.0",
629
+ lifecycle: "active",
630
+ category: "operations",
631
+ description: "Operational task system linked to beliefs, questions, worktrees, and AI-assisted execution.",
632
+ dependencies: ["chat-v1"],
633
+ capabilityFlags: [
634
+ "task.lifecycle",
635
+ "task.assignment",
636
+ "task.attachments",
637
+ "task.ai-execution",
638
+ "task.evidence-capture"
639
+ ],
640
+ routeNamespace: {
641
+ web: ["/(projects)/projects/[projectId]/tasks"],
642
+ api: [
643
+ "/api/tasks/execute",
644
+ "/api/tasks/execute-workflow",
645
+ "/api/tasks/refresh-call-script"
646
+ ]
647
+ },
648
+ surfaces: {
649
+ components: ["components/task/*"],
650
+ convex: [
651
+ "convex/tasks.ts",
652
+ "convex/_taskHelpers.ts",
653
+ "convex/_taskQueryLogic.ts"
654
+ ],
655
+ tools: ["lib/ai/tools/task-tools.ts"]
656
+ },
657
+ policyProfile: {
658
+ audiences: ["internal", "lp"],
659
+ rules: [
660
+ { resource: "task", actions: ["read", "mutate", "admin"] },
661
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
662
+ { resource: "tool_action", actions: ["read", "mutate"] },
663
+ { resource: "artifact", actions: ["read", "summarize", "mutate"] }
664
+ ]
665
+ },
666
+ dataContract: {
667
+ requiredNodeTypes: ["belief", "question", "evidence", "synthesis"],
668
+ requiredEdgeTypes: ["informs", "tests", "belongs_to"],
669
+ requiredTables: ["tasks", "projects", "epistemicNodes", "epistemicEdges"],
670
+ projectionBehavior: "inherits_policy"
671
+ },
672
+ templates: {
673
+ workflows: [
674
+ "tasks/research-plan",
675
+ "tasks/execution-loop",
676
+ "tasks/evidence-capture"
677
+ ],
678
+ prompts: ["tasks/call-script", "tasks/research-plan-generator"],
679
+ reports: [],
680
+ uiLabels: ["tasks", "assignee", "checklist", "workflow_status"]
681
+ },
682
+ testSuite: {
683
+ parity: ["task-management-parity"],
684
+ policy: ["task-project-access-enforcement"],
685
+ contract: ["task-management-pack-contract-v1"]
686
+ }
687
+ });
688
+
689
+ // src/manifests/team-analysis-v1.ts
690
+ var teamAnalysisV1Manifest = defineAppPackManifest({
691
+ key: "team-analysis-v1",
692
+ name: "Team Analysis",
693
+ version: "1.0.0",
694
+ lifecycle: "active",
695
+ category: "analytics",
696
+ description: "Team-level behavioral analytics, archetype distribution, and comparative operating patterns.",
697
+ dependencies: ["user-profiles-v1"],
698
+ capabilityFlags: [
699
+ "team.analytics",
700
+ "team.behavioral-summary",
701
+ "team.archetype-distribution",
702
+ "team.activity-heatmap"
703
+ ],
704
+ routeNamespace: {
705
+ web: ["/(team)/team"],
706
+ api: ["/api/coaching/*"]
707
+ },
708
+ surfaces: {
709
+ components: ["components/charts/*", "components/coaching/*"],
710
+ convex: [
711
+ "convex/users.ts",
712
+ "convex/userAnalytics.ts",
713
+ "convex/projectCards.ts"
714
+ ],
715
+ tools: []
716
+ },
717
+ policyProfile: {
718
+ audiences: ["internal", "tenant_admin"],
719
+ rules: [
720
+ { resource: "team_analytics", actions: ["read", "admin"] },
721
+ { resource: "user_profile", actions: ["read"] },
722
+ { resource: "project", actions: ["read"] }
723
+ ]
724
+ },
725
+ dataContract: {
726
+ requiredNodeTypes: ["belief", "question", "evidence"],
727
+ requiredEdgeTypes: ["informs", "tests"],
728
+ requiredTables: [
729
+ "users",
730
+ "userEpistemicJourney",
731
+ "epistemicAudit",
732
+ "proposalEvents",
733
+ "biSuggestions",
734
+ "beliefConfidence",
735
+ "contradictions",
736
+ "worktrees",
737
+ "tasks"
738
+ ],
739
+ projectionBehavior: "none"
740
+ },
741
+ templates: {
742
+ workflows: ["team/behavioral-summary", "team/coverage-gap-analysis"],
743
+ prompts: ["coaching/team-summary", "coaching/team-recommendations"],
744
+ reports: ["team-operating-review"],
745
+ uiLabels: ["team", "behavior", "distribution", "coverage"]
746
+ },
747
+ testSuite: {
748
+ parity: ["team-page-parity"],
749
+ policy: ["team-analytics-admin-scope"],
750
+ contract: ["team-analysis-pack-contract-v1"]
751
+ },
752
+ sharedServices: [
753
+ {
754
+ service: "knowledge-compiler",
755
+ mode: "required",
756
+ contracts: ["knowledge-compiler-v1"]
757
+ }
758
+ ]
759
+ });
760
+
761
+ // src/manifests/themes-v1.ts
762
+ var themesV1Manifest = defineAppPackManifest({
763
+ key: "themes-v1",
764
+ name: "Themes",
765
+ version: "1.0.0",
766
+ lifecycle: "active",
767
+ category: "domain",
768
+ description: "Thematic research lifecycle built on graph primitives, worktree workflows, and conviction analytics.",
769
+ dependencies: [
770
+ "chat-v1",
771
+ "epistemic-algorithms-v1",
772
+ "news-v1",
773
+ "documents-v1"
774
+ ],
775
+ capabilityFlags: [
776
+ "theme.lifecycle",
777
+ "belief.question.evidence",
778
+ "thesis.development",
779
+ "reporting"
780
+ ],
781
+ routeNamespace: {
782
+ web: [
783
+ "/(projects)/projects",
784
+ "/(projects)/projects/[projectId]",
785
+ "/(projects)/projects/[projectId]/beliefs-v2",
786
+ "/(projects)/projects/[projectId]/questions",
787
+ "/(projects)/projects/[projectId]/research",
788
+ "/(projects)/projects/[projectId]/reports"
789
+ ],
790
+ api: ["/api/research/*", "/api/reports/*", "/api/questions/*"]
791
+ },
792
+ surfaces: {
793
+ components: [
794
+ "components/project/*",
795
+ "components/belief/*",
796
+ "components/question/*",
797
+ "components/research/*",
798
+ "components/reports/*"
799
+ ],
800
+ convex: [
801
+ "convex/themes.ts",
802
+ "convex/projects.ts",
803
+ "convex/thematicWorkflow.ts",
804
+ "convex/reports.ts"
805
+ ],
806
+ tools: [
807
+ "lib/ai/tools/belief-tools.ts",
808
+ "lib/ai/tools/question-tools.ts",
809
+ "lib/ai/tools/navigation-tools.ts"
810
+ ]
811
+ },
812
+ policyProfile: {
813
+ audiences: ["internal", "lp", "public"],
814
+ rules: [
815
+ { resource: "project", actions: ["read", "summarize", "mutate"] },
816
+ { resource: "node", actions: ["read", "summarize", "mutate"] },
817
+ { resource: "edge", actions: ["read", "mutate"] },
818
+ { resource: "report_section", actions: ["read", "summarize", "export"] }
819
+ ]
820
+ },
821
+ dataContract: {
822
+ requiredNodeTypes: ["theme", "belief", "question", "evidence", "synthesis"],
823
+ requiredEdgeTypes: ["belongs_to", "relates_to_thesis", "informs", "tests"],
824
+ requiredTables: [
825
+ "projects",
826
+ "epistemicNodes",
827
+ "epistemicEdges",
828
+ "reports",
829
+ "reportSections",
830
+ "reportTemplates"
831
+ ],
832
+ projectionBehavior: "projection_required"
833
+ },
834
+ templates: {
835
+ workflows: ["themes/default-lifecycle", "themes/worktree-thesis-loop"],
836
+ prompts: [
837
+ "thematic/extractor",
838
+ "reports/thematic-long-form/thesis-statement",
839
+ "reports/thematic-long-form/belief-map"
840
+ ],
841
+ reports: ["thematic-long-form", "knowledge-map"],
842
+ uiLabels: ["theme", "belief", "question", "evidence", "conviction"]
843
+ },
844
+ testSuite: {
845
+ parity: ["themes-v1-parity-against-current"],
846
+ policy: ["theme-compilation-entitlement-filtering"],
847
+ contract: ["themes-pack-contract-v1"]
848
+ },
849
+ sharedServices: [
850
+ {
851
+ service: "knowledge-compiler",
852
+ mode: "required",
853
+ contracts: ["knowledge-compiler-v1"]
854
+ }
855
+ ]
856
+ });
857
+
858
+ // src/manifests/user-profiles-v1.ts
859
+ var userProfilesV1Manifest = defineAppPackManifest({
860
+ key: "user-profiles-v1",
861
+ name: "User Profiles",
862
+ version: "1.0.0",
863
+ lifecycle: "active",
864
+ category: "identity",
865
+ description: "Individual cognition and operating profile layer including journey progression, archetypes, and behavioral telemetry.",
866
+ dependencies: [],
867
+ capabilityFlags: [
868
+ "user.profile",
869
+ "user.journey",
870
+ "user.analytics",
871
+ "voice.preferences"
872
+ ],
873
+ routeNamespace: {
874
+ web: ["/(team)/team/[userId]"],
875
+ api: ["/api/philosophy/get-profile", "/api/mobile/v1/session"]
876
+ },
877
+ surfaces: {
878
+ components: [
879
+ "components/user/*",
880
+ "components/philosophy/ArchetypeDisplay.tsx"
881
+ ],
882
+ convex: [
883
+ "convex/users.ts",
884
+ "convex/userJourney.ts",
885
+ "convex/userSessions.ts",
886
+ "convex/userAnalytics.ts"
887
+ ],
888
+ tools: []
889
+ },
890
+ policyProfile: {
891
+ audiences: ["internal", "tenant_admin"],
892
+ rules: [
893
+ {
894
+ resource: "user_profile",
895
+ actions: ["read", "mutate"],
896
+ notes: "Users can edit self; tenant admins can read broader profiles."
897
+ },
898
+ { resource: "project", actions: ["read"] },
899
+ { resource: "team_analytics", actions: ["read"] }
900
+ ]
901
+ },
902
+ dataContract: {
903
+ requiredNodeTypes: [],
904
+ requiredEdgeTypes: [],
905
+ requiredTables: [
906
+ "users",
907
+ "userEpistemicJourney",
908
+ "userSessions",
909
+ "investorProfiles",
910
+ "investorProfileAtoms",
911
+ "voiceProfiles",
912
+ "userVoiceSettings",
913
+ "archetypeHistory"
914
+ ],
915
+ projectionBehavior: "none"
916
+ },
917
+ templates: {
918
+ workflows: ["user/profile-synthesis", "user/journey-update"],
919
+ prompts: ["coaching/user-eval", "philosophy/profile-synthesis"],
920
+ reports: ["user-profile-summary"],
921
+ uiLabels: ["profile", "journey", "archetype", "calibration"]
922
+ },
923
+ testSuite: {
924
+ parity: ["user-profile-page-parity"],
925
+ policy: ["user-profile-self-vs-admin-access"],
926
+ contract: ["user-profiles-pack-contract-v1"]
927
+ },
928
+ sharedServices: [
929
+ {
930
+ service: "knowledge-compiler",
931
+ mode: "required",
932
+ contracts: ["knowledge-compiler-v1"]
933
+ }
934
+ ]
935
+ });
936
+
937
+ // src/manifests/index.ts
938
+ var allAppPackManifests = [
939
+ philosophyModeV1Manifest,
940
+ chatV1Manifest,
941
+ graphVisualizationV1Manifest,
942
+ epistemicAlgorithmsV1Manifest,
943
+ themesV1Manifest,
944
+ dealsV1Manifest,
945
+ decisionsV1Manifest,
946
+ newsV1Manifest,
947
+ documentsV1Manifest,
948
+ userProfilesV1Manifest,
949
+ teamAnalysisV1Manifest,
950
+ taskManagementV1Manifest
951
+ ];
952
+
953
+ export { allAppPackManifests, chatV1Manifest, dealsV1Manifest, decisionsV1Manifest, documentsV1Manifest, epistemicAlgorithmsV1Manifest, graphVisualizationV1Manifest, newsV1Manifest, philosophyModeV1Manifest, taskManagementV1Manifest, teamAnalysisV1Manifest, themesV1Manifest, userProfilesV1Manifest };
954
+ //# sourceMappingURL=index.js.map
955
+ //# sourceMappingURL=index.js.map