@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.
- package/README.md +64 -0
- package/dist/contracts.d.ts +77 -0
- package/dist/contracts.js +21 -0
- package/dist/contracts.js.map +1 -0
- package/dist/convex.config.d.ts +5 -0
- package/dist/convex.config.js +9 -0
- package/dist/convex.config.js.map +1 -0
- package/dist/dependencyResolution.d.ts +18 -0
- package/dist/dependencyResolution.js +131 -0
- package/dist/dependencyResolution.js.map +1 -0
- package/dist/domain-pack/authoring.d.ts +172 -0
- package/dist/domain-pack/authoring.js +1896 -0
- package/dist/domain-pack/authoring.js.map +1 -0
- package/dist/domain-pack/contracts.d.ts +183 -0
- package/dist/domain-pack/contracts.js +65 -0
- package/dist/domain-pack/contracts.js.map +1 -0
- package/dist/domain-pack/index.d.ts +8 -0
- package/dist/domain-pack/index.js +3813 -0
- package/dist/domain-pack/index.js.map +1 -0
- package/dist/domain-pack/ontology/software-entities-v1.d.ts +102 -0
- package/dist/domain-pack/ontology/software-entities-v1.js +104 -0
- package/dist/domain-pack/ontology/software-entities-v1.js.map +1 -0
- package/dist/domain-pack/packs/developer-reasoning.d.ts +14 -0
- package/dist/domain-pack/packs/developer-reasoning.js +339 -0
- package/dist/domain-pack/packs/developer-reasoning.js.map +1 -0
- package/dist/domain-pack/packs/engineering-accelerator.d.ts +11 -0
- package/dist/domain-pack/packs/engineering-accelerator.js +1348 -0
- package/dist/domain-pack/packs/engineering-accelerator.js.map +1 -0
- package/dist/domain-pack/packs/index.d.ts +18 -0
- package/dist/domain-pack/packs/index.js +2653 -0
- package/dist/domain-pack/packs/index.js.map +1 -0
- package/dist/domain-pack/shaping.d.ts +54 -0
- package/dist/domain-pack/shaping.js +1013 -0
- package/dist/domain-pack/shaping.js.map +1 -0
- package/dist/domain-pack/validation.d.ts +26 -0
- package/dist/domain-pack/validation.js +775 -0
- package/dist/domain-pack/validation.js.map +1 -0
- package/dist/domain-pack.d.ts +8 -0
- package/dist/domain-pack.js +3813 -0
- package/dist/domain-pack.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +5520 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle.d.ts +27 -0
- package/dist/lifecycle.js +98 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/manifestValidation.d.ts +28 -0
- package/dist/manifestValidation.js +253 -0
- package/dist/manifestValidation.js.map +1 -0
- package/dist/manifests/chat-v1.d.ts +10 -0
- package/dist/manifests/chat-v1.js +87 -0
- package/dist/manifests/chat-v1.js.map +1 -0
- package/dist/manifests/deals-v1.d.ts +10 -0
- package/dist/manifests/deals-v1.js +107 -0
- package/dist/manifests/deals-v1.js.map +1 -0
- package/dist/manifests/decisions-v1.d.ts +10 -0
- package/dist/manifests/decisions-v1.js +103 -0
- package/dist/manifests/decisions-v1.js.map +1 -0
- package/dist/manifests/documents-v1.d.ts +10 -0
- package/dist/manifests/documents-v1.js +88 -0
- package/dist/manifests/documents-v1.js.map +1 -0
- package/dist/manifests/epistemic-algorithms-v1.d.ts +10 -0
- package/dist/manifests/epistemic-algorithms-v1.js +107 -0
- package/dist/manifests/epistemic-algorithms-v1.js.map +1 -0
- package/dist/manifests/graph-visualization-v1.d.ts +10 -0
- package/dist/manifests/graph-visualization-v1.js +88 -0
- package/dist/manifests/graph-visualization-v1.js.map +1 -0
- package/dist/manifests/index.d.ts +23 -0
- package/dist/manifests/index.js +955 -0
- package/dist/manifests/index.js.map +1 -0
- package/dist/manifests/news-v1.d.ts +10 -0
- package/dist/manifests/news-v1.js +93 -0
- package/dist/manifests/news-v1.js.map +1 -0
- package/dist/manifests/philosophy-mode-v1.d.ts +10 -0
- package/dist/manifests/philosophy-mode-v1.js +100 -0
- package/dist/manifests/philosophy-mode-v1.js.map +1 -0
- package/dist/manifests/task-management-v1.d.ts +10 -0
- package/dist/manifests/task-management-v1.js +86 -0
- package/dist/manifests/task-management-v1.js.map +1 -0
- package/dist/manifests/team-analysis-v1.d.ts +10 -0
- package/dist/manifests/team-analysis-v1.js +93 -0
- package/dist/manifests/team-analysis-v1.js.map +1 -0
- package/dist/manifests/themes-v1.d.ts +10 -0
- package/dist/manifests/themes-v1.js +118 -0
- package/dist/manifests/themes-v1.js.map +1 -0
- package/dist/manifests/user-profiles-v1.d.ts +10 -0
- package/dist/manifests/user-profiles-v1.js +100 -0
- package/dist/manifests/user-profiles-v1.js.map +1 -0
- package/dist/manifests.d.ts +14 -0
- package/dist/manifests.js +955 -0
- package/dist/manifests.js.map +1 -0
- package/dist/namespacePolicy.d.ts +26 -0
- package/dist/namespacePolicy.js +129 -0
- package/dist/namespacePolicy.js.map +1 -0
- package/dist/registry.d.ts +13 -0
- package/dist/registry.js +1710 -0
- package/dist/registry.js.map +1 -0
- package/dist/runtime.d.ts +19 -0
- package/dist/runtime.js +638 -0
- package/dist/runtime.js.map +1 -0
- package/dist/serviceContracts.d.ts +18 -0
- package/dist/serviceContracts.js +64 -0
- package/dist/serviceContracts.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,93 @@
|
|
|
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/team-analysis-v1.ts
|
|
20
|
+
var teamAnalysisV1Manifest = defineAppPackManifest({
|
|
21
|
+
key: "team-analysis-v1",
|
|
22
|
+
name: "Team Analysis",
|
|
23
|
+
version: "1.0.0",
|
|
24
|
+
lifecycle: "active",
|
|
25
|
+
category: "analytics",
|
|
26
|
+
description: "Team-level behavioral analytics, archetype distribution, and comparative operating patterns.",
|
|
27
|
+
dependencies: ["user-profiles-v1"],
|
|
28
|
+
capabilityFlags: [
|
|
29
|
+
"team.analytics",
|
|
30
|
+
"team.behavioral-summary",
|
|
31
|
+
"team.archetype-distribution",
|
|
32
|
+
"team.activity-heatmap"
|
|
33
|
+
],
|
|
34
|
+
routeNamespace: {
|
|
35
|
+
web: ["/(team)/team"],
|
|
36
|
+
api: ["/api/coaching/*"]
|
|
37
|
+
},
|
|
38
|
+
surfaces: {
|
|
39
|
+
components: ["components/charts/*", "components/coaching/*"],
|
|
40
|
+
convex: [
|
|
41
|
+
"convex/users.ts",
|
|
42
|
+
"convex/userAnalytics.ts",
|
|
43
|
+
"convex/projectCards.ts"
|
|
44
|
+
],
|
|
45
|
+
tools: []
|
|
46
|
+
},
|
|
47
|
+
policyProfile: {
|
|
48
|
+
audiences: ["internal", "tenant_admin"],
|
|
49
|
+
rules: [
|
|
50
|
+
{ resource: "team_analytics", actions: ["read", "admin"] },
|
|
51
|
+
{ resource: "user_profile", actions: ["read"] },
|
|
52
|
+
{ resource: "project", actions: ["read"] }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
dataContract: {
|
|
56
|
+
requiredNodeTypes: ["belief", "question", "evidence"],
|
|
57
|
+
requiredEdgeTypes: ["informs", "tests"],
|
|
58
|
+
requiredTables: [
|
|
59
|
+
"users",
|
|
60
|
+
"userEpistemicJourney",
|
|
61
|
+
"epistemicAudit",
|
|
62
|
+
"proposalEvents",
|
|
63
|
+
"biSuggestions",
|
|
64
|
+
"beliefConfidence",
|
|
65
|
+
"contradictions",
|
|
66
|
+
"worktrees",
|
|
67
|
+
"tasks"
|
|
68
|
+
],
|
|
69
|
+
projectionBehavior: "none"
|
|
70
|
+
},
|
|
71
|
+
templates: {
|
|
72
|
+
workflows: ["team/behavioral-summary", "team/coverage-gap-analysis"],
|
|
73
|
+
prompts: ["coaching/team-summary", "coaching/team-recommendations"],
|
|
74
|
+
reports: ["team-operating-review"],
|
|
75
|
+
uiLabels: ["team", "behavior", "distribution", "coverage"]
|
|
76
|
+
},
|
|
77
|
+
testSuite: {
|
|
78
|
+
parity: ["team-page-parity"],
|
|
79
|
+
policy: ["team-analytics-admin-scope"],
|
|
80
|
+
contract: ["team-analysis-pack-contract-v1"]
|
|
81
|
+
},
|
|
82
|
+
sharedServices: [
|
|
83
|
+
{
|
|
84
|
+
service: "knowledge-compiler",
|
|
85
|
+
mode: "required",
|
|
86
|
+
contracts: ["knowledge-compiler-v1"]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export { teamAnalysisV1Manifest };
|
|
92
|
+
//# sourceMappingURL=team-analysis-v1.js.map
|
|
93
|
+
//# sourceMappingURL=team-analysis-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/contracts.ts","../../src/manifests/team-analysis-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,IAAA,EAAM,CAAA,CAC3B,MAAA,CAAO,CAAC,KAAA,KAAU,KAAA,CAAM,SAAS,CAAC,CAAA;AACrC,EAAA,OAAO,KAAA,CAAM,IAAA,CAAK,IAAI,GAAA,CAAI,UAAU,CAAC,CAAA;AACvC;AAEO,SAAS,sBACd,QAAA,EACiB;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,cAAA,IAAkB,EAAC,EAAG,GAAA,CAAI,CAAC,WAAA,MAAiB;AAAA,IAC3E,GAAG,WAAA;AAAA,IACH,SAAA,EAAW,oBAAA,CAAqB,WAAA,CAAY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;AAAE;AAC3C,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,iBAAA,EAAmB,CAAC,QAAA,EAAU,UAAA,EAAY,UAAU,CAAA;AAAA,IACpD,iBAAA,EAAmB,CAAC,SAAA,EAAW,OAAO,CAAA;AAAA,IACtC,cAAA,EAAgB;AAAA,MACd,OAAA;AAAA,MACA,sBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,eAAA;AAAA,MACA,kBAAA;AAAA,MACA,gBAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,yBAAA,EAA2B,4BAA4B,CAAA;AAAA,IACnE,OAAA,EAAS,CAAC,uBAAA,EAAyB,+BAA+B,CAAA;AAAA,IAClE,OAAA,EAAS,CAAC,uBAAuB,CAAA;AAAA,IACjC,QAAA,EAAU,CAAC,MAAA,EAAQ,UAAA,EAAY,gBAAgB,UAAU;AAAA,GAC3D;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kBAAkB,CAAA;AAAA,IAC3B,MAAA,EAAQ,CAAC,4BAA4B,CAAA;AAAA,IACrC,QAAA,EAAU,CAAC,gCAAgC;AAAA,GAC7C;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"team-analysis-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: team-analysis-v1\n *\n * Declarative runtime contract for the team-analysis-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const teamAnalysisV1Manifest = defineAppPackManifest({\n key: \"team-analysis-v1\",\n name: \"Team Analysis\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"analytics\",\n description:\n \"Team-level behavioral analytics, archetype distribution, and comparative operating patterns.\",\n dependencies: [\"user-profiles-v1\"],\n capabilityFlags: [\n \"team.analytics\",\n \"team.behavioral-summary\",\n \"team.archetype-distribution\",\n \"team.activity-heatmap\",\n ],\n routeNamespace: {\n web: [\"/(team)/team\"],\n api: [\"/api/coaching/*\"],\n },\n surfaces: {\n components: [\"components/charts/*\", \"components/coaching/*\"],\n convex: [\n \"convex/users.ts\",\n \"convex/userAnalytics.ts\",\n \"convex/projectCards.ts\",\n ],\n tools: [],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n { resource: \"team_analytics\", actions: [\"read\", \"admin\"] },\n { resource: \"user_profile\", actions: [\"read\"] },\n { resource: \"project\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"belief\", \"question\", \"evidence\"],\n requiredEdgeTypes: [\"informs\", \"tests\"],\n requiredTables: [\n \"users\",\n \"userEpistemicJourney\",\n \"epistemicAudit\",\n \"proposalEvents\",\n \"biSuggestions\",\n \"beliefConfidence\",\n \"contradictions\",\n \"worktrees\",\n \"tasks\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"team/behavioral-summary\", \"team/coverage-gap-analysis\"],\n prompts: [\"coaching/team-summary\", \"coaching/team-recommendations\"],\n reports: [\"team-operating-review\"],\n uiLabels: [\"team\", \"behavior\", \"distribution\", \"coverage\"],\n },\n testSuite: {\n parity: [\"team-page-parity\"],\n policy: [\"team-analytics-admin-scope\"],\n contract: [\"team-analysis-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
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/themes-v1.ts
|
|
20
|
+
var themesV1Manifest = defineAppPackManifest({
|
|
21
|
+
key: "themes-v1",
|
|
22
|
+
name: "Themes",
|
|
23
|
+
version: "1.0.0",
|
|
24
|
+
lifecycle: "active",
|
|
25
|
+
category: "domain",
|
|
26
|
+
description: "Thematic research lifecycle built on graph primitives, worktree workflows, and conviction analytics.",
|
|
27
|
+
dependencies: [
|
|
28
|
+
"chat-v1",
|
|
29
|
+
"epistemic-algorithms-v1",
|
|
30
|
+
"news-v1",
|
|
31
|
+
"documents-v1"
|
|
32
|
+
],
|
|
33
|
+
capabilityFlags: [
|
|
34
|
+
"theme.lifecycle",
|
|
35
|
+
"belief.question.evidence",
|
|
36
|
+
"thesis.development",
|
|
37
|
+
"reporting"
|
|
38
|
+
],
|
|
39
|
+
routeNamespace: {
|
|
40
|
+
web: [
|
|
41
|
+
"/(projects)/projects",
|
|
42
|
+
"/(projects)/projects/[projectId]",
|
|
43
|
+
"/(projects)/projects/[projectId]/beliefs-v2",
|
|
44
|
+
"/(projects)/projects/[projectId]/questions",
|
|
45
|
+
"/(projects)/projects/[projectId]/research",
|
|
46
|
+
"/(projects)/projects/[projectId]/reports"
|
|
47
|
+
],
|
|
48
|
+
api: ["/api/research/*", "/api/reports/*", "/api/questions/*"]
|
|
49
|
+
},
|
|
50
|
+
surfaces: {
|
|
51
|
+
components: [
|
|
52
|
+
"components/project/*",
|
|
53
|
+
"components/belief/*",
|
|
54
|
+
"components/question/*",
|
|
55
|
+
"components/research/*",
|
|
56
|
+
"components/reports/*"
|
|
57
|
+
],
|
|
58
|
+
convex: [
|
|
59
|
+
"convex/themes.ts",
|
|
60
|
+
"convex/projects.ts",
|
|
61
|
+
"convex/thematicWorkflow.ts",
|
|
62
|
+
"convex/reports.ts"
|
|
63
|
+
],
|
|
64
|
+
tools: [
|
|
65
|
+
"lib/ai/tools/belief-tools.ts",
|
|
66
|
+
"lib/ai/tools/question-tools.ts",
|
|
67
|
+
"lib/ai/tools/navigation-tools.ts"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
policyProfile: {
|
|
71
|
+
audiences: ["internal", "lp", "public"],
|
|
72
|
+
rules: [
|
|
73
|
+
{ resource: "project", actions: ["read", "summarize", "mutate"] },
|
|
74
|
+
{ resource: "node", actions: ["read", "summarize", "mutate"] },
|
|
75
|
+
{ resource: "edge", actions: ["read", "mutate"] },
|
|
76
|
+
{ resource: "report_section", actions: ["read", "summarize", "export"] }
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
dataContract: {
|
|
80
|
+
requiredNodeTypes: ["theme", "belief", "question", "evidence", "synthesis"],
|
|
81
|
+
requiredEdgeTypes: ["belongs_to", "relates_to_thesis", "informs", "tests"],
|
|
82
|
+
requiredTables: [
|
|
83
|
+
"projects",
|
|
84
|
+
"epistemicNodes",
|
|
85
|
+
"epistemicEdges",
|
|
86
|
+
"reports",
|
|
87
|
+
"reportSections",
|
|
88
|
+
"reportTemplates"
|
|
89
|
+
],
|
|
90
|
+
projectionBehavior: "projection_required"
|
|
91
|
+
},
|
|
92
|
+
templates: {
|
|
93
|
+
workflows: ["themes/default-lifecycle", "themes/worktree-thesis-loop"],
|
|
94
|
+
prompts: [
|
|
95
|
+
"thematic/extractor",
|
|
96
|
+
"reports/thematic-long-form/thesis-statement",
|
|
97
|
+
"reports/thematic-long-form/belief-map"
|
|
98
|
+
],
|
|
99
|
+
reports: ["thematic-long-form", "knowledge-map"],
|
|
100
|
+
uiLabels: ["theme", "belief", "question", "evidence", "conviction"]
|
|
101
|
+
},
|
|
102
|
+
testSuite: {
|
|
103
|
+
parity: ["themes-v1-parity-against-current"],
|
|
104
|
+
policy: ["theme-compilation-entitlement-filtering"],
|
|
105
|
+
contract: ["themes-pack-contract-v1"]
|
|
106
|
+
},
|
|
107
|
+
sharedServices: [
|
|
108
|
+
{
|
|
109
|
+
service: "knowledge-compiler",
|
|
110
|
+
mode: "required",
|
|
111
|
+
contracts: ["knowledge-compiler-v1"]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export { themesV1Manifest };
|
|
117
|
+
//# sourceMappingURL=themes-v1.js.map
|
|
118
|
+
//# sourceMappingURL=themes-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/contracts.ts","../../src/manifests/themes-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4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;AAAA,KACF;AAAA,IACA,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,SAAA,EAAW;AAAA,IACT,SAAA,EAAW,CAAC,0BAAA,EAA4B,6BAA6B,CAAA;AAAA,IACrE,OAAA,EAAS;AAAA,MACP,oBAAA;AAAA,MACA,6CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,CAAC,oBAAA,EAAsB,eAAe,CAAA;AAAA,IAC/C,UAAU,CAAC,OAAA,EAAS,QAAA,EAAU,UAAA,EAAY,YAAY,YAAY;AAAA,GACpE;AAAA,EACA,SAAA,EAAW;AAAA,IACT,MAAA,EAAQ,CAAC,kCAAkC,CAAA;AAAA,IAC3C,MAAA,EAAQ,CAAC,yCAAyC,CAAA;AAAA,IAClD,QAAA,EAAU,CAAC,yBAAyB;AAAA,GACtC;AAAA,EACA,cAAA,EAAgB;AAAA,IACd;AAAA,MACE,OAAA,EAAS,oBAAA;AAAA,MACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"themes-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: themes-v1\n *\n * Declarative runtime contract for the themes-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const themesV1Manifest = defineAppPackManifest({\n key: \"themes-v1\",\n name: \"Themes\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"domain\",\n description:\n \"Thematic research lifecycle built on graph primitives, worktree workflows, and conviction analytics.\",\n dependencies: [\n \"chat-v1\",\n \"epistemic-algorithms-v1\",\n \"news-v1\",\n \"documents-v1\",\n ],\n capabilityFlags: [\n \"theme.lifecycle\",\n \"belief.question.evidence\",\n \"thesis.development\",\n \"reporting\",\n ],\n routeNamespace: {\n web: [\n \"/(projects)/projects\",\n \"/(projects)/projects/[projectId]\",\n \"/(projects)/projects/[projectId]/beliefs-v2\",\n \"/(projects)/projects/[projectId]/questions\",\n \"/(projects)/projects/[projectId]/research\",\n \"/(projects)/projects/[projectId]/reports\",\n ],\n api: [\"/api/research/*\", \"/api/reports/*\", \"/api/questions/*\"],\n },\n surfaces: {\n components: [\n \"components/project/*\",\n \"components/belief/*\",\n \"components/question/*\",\n \"components/research/*\",\n \"components/reports/*\",\n ],\n convex: [\n \"convex/themes.ts\",\n \"convex/projects.ts\",\n \"convex/thematicWorkflow.ts\",\n \"convex/reports.ts\",\n ],\n tools: [\n \"lib/ai/tools/belief-tools.ts\",\n \"lib/ai/tools/question-tools.ts\",\n \"lib/ai/tools/navigation-tools.ts\",\n ],\n },\n policyProfile: {\n audiences: [\"internal\", \"lp\", \"public\"],\n rules: [\n { resource: \"project\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"node\", actions: [\"read\", \"summarize\", \"mutate\"] },\n { resource: \"edge\", actions: [\"read\", \"mutate\"] },\n { resource: \"report_section\", actions: [\"read\", \"summarize\", \"export\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [\"theme\", \"belief\", \"question\", \"evidence\", \"synthesis\"],\n requiredEdgeTypes: [\"belongs_to\", \"relates_to_thesis\", \"informs\", \"tests\"],\n requiredTables: [\n \"projects\",\n \"epistemicNodes\",\n \"epistemicEdges\",\n \"reports\",\n \"reportSections\",\n \"reportTemplates\",\n ],\n projectionBehavior: \"projection_required\",\n },\n templates: {\n workflows: [\"themes/default-lifecycle\", \"themes/worktree-thesis-loop\"],\n prompts: [\n \"thematic/extractor\",\n \"reports/thematic-long-form/thesis-statement\",\n \"reports/thematic-long-form/belief-map\",\n ],\n reports: [\"thematic-long-form\", \"knowledge-map\"],\n uiLabels: [\"theme\", \"belief\", \"question\", \"evidence\", \"conviction\"],\n },\n testSuite: {\n parity: [\"themes-v1-parity-against-current\"],\n policy: [\"theme-compilation-entitlement-filtering\"],\n contract: [\"themes-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppPackManifest } from '../contracts.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* App Pack Manifest: user-profiles-v1
|
|
5
|
+
*
|
|
6
|
+
* Declarative runtime contract for the user-profiles-v1 application pack.
|
|
7
|
+
*/
|
|
8
|
+
declare const userProfilesV1Manifest: AppPackManifest;
|
|
9
|
+
|
|
10
|
+
export { userProfilesV1Manifest };
|
|
@@ -0,0 +1,100 @@
|
|
|
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/user-profiles-v1.ts
|
|
20
|
+
var userProfilesV1Manifest = defineAppPackManifest({
|
|
21
|
+
key: "user-profiles-v1",
|
|
22
|
+
name: "User Profiles",
|
|
23
|
+
version: "1.0.0",
|
|
24
|
+
lifecycle: "active",
|
|
25
|
+
category: "identity",
|
|
26
|
+
description: "Individual cognition and operating profile layer including journey progression, archetypes, and behavioral telemetry.",
|
|
27
|
+
dependencies: [],
|
|
28
|
+
capabilityFlags: [
|
|
29
|
+
"user.profile",
|
|
30
|
+
"user.journey",
|
|
31
|
+
"user.analytics",
|
|
32
|
+
"voice.preferences"
|
|
33
|
+
],
|
|
34
|
+
routeNamespace: {
|
|
35
|
+
web: ["/(team)/team/[userId]"],
|
|
36
|
+
api: ["/api/philosophy/get-profile", "/api/mobile/v1/session"]
|
|
37
|
+
},
|
|
38
|
+
surfaces: {
|
|
39
|
+
components: [
|
|
40
|
+
"components/user/*",
|
|
41
|
+
"components/philosophy/ArchetypeDisplay.tsx"
|
|
42
|
+
],
|
|
43
|
+
convex: [
|
|
44
|
+
"convex/users.ts",
|
|
45
|
+
"convex/userJourney.ts",
|
|
46
|
+
"convex/userSessions.ts",
|
|
47
|
+
"convex/userAnalytics.ts"
|
|
48
|
+
],
|
|
49
|
+
tools: []
|
|
50
|
+
},
|
|
51
|
+
policyProfile: {
|
|
52
|
+
audiences: ["internal", "tenant_admin"],
|
|
53
|
+
rules: [
|
|
54
|
+
{
|
|
55
|
+
resource: "user_profile",
|
|
56
|
+
actions: ["read", "mutate"],
|
|
57
|
+
notes: "Users can edit self; tenant admins can read broader profiles."
|
|
58
|
+
},
|
|
59
|
+
{ resource: "project", actions: ["read"] },
|
|
60
|
+
{ resource: "team_analytics", actions: ["read"] }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
dataContract: {
|
|
64
|
+
requiredNodeTypes: [],
|
|
65
|
+
requiredEdgeTypes: [],
|
|
66
|
+
requiredTables: [
|
|
67
|
+
"users",
|
|
68
|
+
"userEpistemicJourney",
|
|
69
|
+
"userSessions",
|
|
70
|
+
"investorProfiles",
|
|
71
|
+
"investorProfileAtoms",
|
|
72
|
+
"voiceProfiles",
|
|
73
|
+
"userVoiceSettings",
|
|
74
|
+
"archetypeHistory"
|
|
75
|
+
],
|
|
76
|
+
projectionBehavior: "none"
|
|
77
|
+
},
|
|
78
|
+
templates: {
|
|
79
|
+
workflows: ["user/profile-synthesis", "user/journey-update"],
|
|
80
|
+
prompts: ["coaching/user-eval", "philosophy/profile-synthesis"],
|
|
81
|
+
reports: ["user-profile-summary"],
|
|
82
|
+
uiLabels: ["profile", "journey", "archetype", "calibration"]
|
|
83
|
+
},
|
|
84
|
+
testSuite: {
|
|
85
|
+
parity: ["user-profile-page-parity"],
|
|
86
|
+
policy: ["user-profile-self-vs-admin-access"],
|
|
87
|
+
contract: ["user-profiles-pack-contract-v1"]
|
|
88
|
+
},
|
|
89
|
+
sharedServices: [
|
|
90
|
+
{
|
|
91
|
+
service: "knowledge-compiler",
|
|
92
|
+
mode: "required",
|
|
93
|
+
contracts: ["knowledge-compiler-v1"]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export { userProfilesV1Manifest };
|
|
99
|
+
//# sourceMappingURL=user-profiles-v1.js.map
|
|
100
|
+
//# sourceMappingURL=user-profiles-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/contracts.ts","../../src/manifests/user-profiles-v1.ts"],"names":[],"mappings":";AA+HA,SAAS,qBAAqB,MAAA,EAA4B;AACxD,EAAA,MAAM,UAAA,GAAa,MAAA,CAChB,GAAA,CAAI,CAAC,UAAU,KAAA,CAAM,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ACT,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,uBAAuB;AAAA;AACrC;AAEJ,CAAC","file":"user-profiles-v1.js","sourcesContent":["/**\n * App Pack Contracts\n *\n * Canonical type contracts for Lucern app-pack manifests and runtime metadata.\n */\n\nexport type PackLifecycle = \"active\" | \"beta\" | \"experimental\";\n\nexport type PackCategory =\n | \"conversation\"\n | \"research\"\n | \"graph\"\n | \"analytics\"\n | \"workflow\"\n | \"decision\"\n | \"news\"\n | \"documents\"\n | \"identity\"\n | \"operations\"\n | \"domain\";\n\nexport type PackAudience = string;\n\nexport type PolicyAction = \"read\" | \"summarize\" | \"export\" | \"mutate\" | \"admin\";\n\nexport type PolicyResource =\n | \"project\"\n | \"node\"\n | \"edge\"\n | \"artifact\"\n | \"report_section\"\n | \"tool_action\"\n | \"task\"\n | \"user_profile\"\n | \"team_analytics\";\n\nexport type ProjectionBehavior =\n | \"none\"\n | \"inherits_policy\"\n | \"projection_required\";\n\nexport type PackRuntimeStage =\n | \"registered\"\n | \"validated\"\n | \"installed\"\n | \"enabled\"\n | \"degraded\"\n | \"disabled\"\n | \"removed\";\n\nexport type SharedService =\n | \"decision-kernel\"\n | \"knowledge-compiler\"\n | \"learning-loop\";\n\nexport type SharedServiceMode = \"required\" | \"optional\";\n\nexport type RouteNamespace = {\n web: string[];\n api: string[];\n};\n\nexport type SurfaceOwnership = {\n components: string[];\n convex: string[];\n tools: string[];\n};\n\nexport type PolicyRule = {\n resource: PolicyResource;\n actions: PolicyAction[];\n notes?: string;\n};\n\nexport type PolicyProfile = {\n audiences: PackAudience[];\n rules: PolicyRule[];\n};\n\nexport type DataContract = {\n requiredNodeTypes: string[];\n requiredEdgeTypes: string[];\n requiredTables: string[];\n projectionBehavior: ProjectionBehavior;\n};\n\nexport type TemplateAssets = {\n workflows: string[];\n prompts: string[];\n reports: string[];\n uiLabels: string[];\n};\n\nexport type PackTestSuite = {\n parity: string[];\n policy: string[];\n contract: string[];\n};\n\nexport type SharedServiceIntegration = {\n service: SharedService;\n mode: SharedServiceMode;\n contracts: string[];\n};\n\nexport type AppPackManifest = {\n key: string;\n name: string;\n version: string;\n lifecycle: PackLifecycle;\n category: PackCategory;\n description: string;\n dependencies: string[];\n capabilityFlags: string[];\n routeNamespace: RouteNamespace;\n surfaces: SurfaceOwnership;\n policyProfile: PolicyProfile;\n dataContract: DataContract;\n templates: TemplateAssets;\n testSuite: PackTestSuite;\n sharedServices: SharedServiceIntegration[];\n};\n\ntype AppPackManifestInput = Omit<AppPackManifest, \"sharedServices\"> & {\n sharedServices?: SharedServiceIntegration[];\n};\n\nfunction normalizeStringArray(values: string[]): string[] {\n const normalized = values\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n return Array.from(new Set(normalized));\n}\n\nexport function defineAppPackManifest(\n manifest: AppPackManifestInput\n): AppPackManifest {\n const sharedServices = (manifest.sharedServices ?? []).map((integration) => ({\n ...integration,\n contracts: normalizeStringArray(integration.contracts),\n }));\n\n return {\n ...manifest,\n dependencies: normalizeStringArray(manifest.dependencies),\n capabilityFlags: normalizeStringArray(manifest.capabilityFlags),\n sharedServices,\n };\n}\n","/**\n * App Pack Manifest: user-profiles-v1\n *\n * Declarative runtime contract for the user-profiles-v1 application pack.\n */\n\nimport { defineAppPackManifest } from \"../contracts\";\n\nexport const userProfilesV1Manifest = defineAppPackManifest({\n key: \"user-profiles-v1\",\n name: \"User Profiles\",\n version: \"1.0.0\",\n lifecycle: \"active\",\n category: \"identity\",\n description:\n \"Individual cognition and operating profile layer including journey progression, archetypes, and behavioral telemetry.\",\n dependencies: [],\n capabilityFlags: [\n \"user.profile\",\n \"user.journey\",\n \"user.analytics\",\n \"voice.preferences\",\n ],\n routeNamespace: {\n web: [\"/(team)/team/[userId]\"],\n api: [\"/api/philosophy/get-profile\", \"/api/mobile/v1/session\"],\n },\n surfaces: {\n components: [\n \"components/user/*\",\n \"components/philosophy/ArchetypeDisplay.tsx\",\n ],\n convex: [\n \"convex/users.ts\",\n \"convex/userJourney.ts\",\n \"convex/userSessions.ts\",\n \"convex/userAnalytics.ts\",\n ],\n tools: [],\n },\n policyProfile: {\n audiences: [\"internal\", \"tenant_admin\"],\n rules: [\n {\n resource: \"user_profile\",\n actions: [\"read\", \"mutate\"],\n notes: \"Users can edit self; tenant admins can read broader profiles.\",\n },\n { resource: \"project\", actions: [\"read\"] },\n { resource: \"team_analytics\", actions: [\"read\"] },\n ],\n },\n dataContract: {\n requiredNodeTypes: [],\n requiredEdgeTypes: [],\n requiredTables: [\n \"users\",\n \"userEpistemicJourney\",\n \"userSessions\",\n \"investorProfiles\",\n \"investorProfileAtoms\",\n \"voiceProfiles\",\n \"userVoiceSettings\",\n \"archetypeHistory\",\n ],\n projectionBehavior: \"none\",\n },\n templates: {\n workflows: [\"user/profile-synthesis\", \"user/journey-update\"],\n prompts: [\"coaching/user-eval\", \"philosophy/profile-synthesis\"],\n reports: [\"user-profile-summary\"],\n uiLabels: [\"profile\", \"journey\", \"archetype\", \"calibration\"],\n },\n testSuite: {\n parity: [\"user-profile-page-parity\"],\n policy: [\"user-profile-self-vs-admin-access\"],\n contract: [\"user-profiles-pack-contract-v1\"],\n },\n sharedServices: [\n {\n service: \"knowledge-compiler\",\n mode: \"required\",\n contracts: [\"knowledge-compiler-v1\"],\n },\n ],\n});\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { allAppPackManifests } from './manifests/index.js';
|
|
2
|
+
export { chatV1Manifest } from './manifests/chat-v1.js';
|
|
3
|
+
export { decisionsV1Manifest } from './manifests/decisions-v1.js';
|
|
4
|
+
export { dealsV1Manifest } from './manifests/deals-v1.js';
|
|
5
|
+
export { documentsV1Manifest } from './manifests/documents-v1.js';
|
|
6
|
+
export { epistemicAlgorithmsV1Manifest } from './manifests/epistemic-algorithms-v1.js';
|
|
7
|
+
export { graphVisualizationV1Manifest } from './manifests/graph-visualization-v1.js';
|
|
8
|
+
export { newsV1Manifest } from './manifests/news-v1.js';
|
|
9
|
+
export { philosophyModeV1Manifest } from './manifests/philosophy-mode-v1.js';
|
|
10
|
+
export { taskManagementV1Manifest } from './manifests/task-management-v1.js';
|
|
11
|
+
export { teamAnalysisV1Manifest } from './manifests/team-analysis-v1.js';
|
|
12
|
+
export { themesV1Manifest } from './manifests/themes-v1.js';
|
|
13
|
+
export { userProfilesV1Manifest } from './manifests/user-profiles-v1.js';
|
|
14
|
+
import './contracts.js';
|